Iterating on an ASP.NET MVC Model Binder

Posted by: K. Scott Allen, on 06 May 2009 | View original | Bookmarked: 0 time(s)

After my last post on model binding tips Ive had a number of questions about the nuances of model binding. Lets work through a sample. Imagine you have a Recipe class that can hold all the information you need to make Love Mussels, and now you've decided to build a model binder to bind and validate recipes.  Iteration 1 Lets start with the naive approach. This code has a number of problems. public class RecipeModelBinder : IModelBinder { public object BindModel(ControllerContext controllerContext,...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1339 | Hits: 90

Similar Posts

  • Spec Explorer: A Model-Based Testing tool more
  • MvcContrib working on Portable Areas more
  • RELEASED ASP.NET MVC 2 Preview 2 more
  • Html Encoding Code Blocks With ASP.NET 4 more
  • Business Apps Example for Silverlight 3 RTM and .NET RIA Services July Update: Part 25: ViewModel more
  • MvcContrib version control has moved to GitHub more
  • Lots of buzz about MvcContrib! more
  • Afternoon of ASP.NET MVC [16 June] (free Headspring event) more
  • Binding in ASP.NET MVC more
  • ASP.NET MVC 2.0 and VS 2010 plan now public more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD