Posts

Showing posts with the label Model Binding

Model Binding Feature in Asp.Net 4.5

Image
Model binding isn’t exactly a “new” feature when it comes to .NET because ASP.NET MVC has had it for a long time. However, it’s new to ASP.NET Web Forms and yet another feature that will truly change how you write your application code if you take advantage of what it offers. Model binding is the process of getting model objects in and out of controls without writing a lot of plumbing code to do it. You can now bind data controls directly to methods that provide select, insert, update and delete functionality. When the methods are called you don’t have to write a lot of code to access the values that were posted back in the case of update, insert, or delete operations. Instead, model binding allows you to have a given model object’s properties (a class with properties if you’re not familiar with model objects) automatically filled with the posted back data. Data bound controls are the major part of typical web form applications and we spend a lot of time in writing code r...