Strongly Typed Data Controls and Model Binding

In the real world, you often need to perform data-binding at runtime. For example, if you have a GridView control like in the previous sample application, you can perform runtime binding by assigning the DataSource property and then invoking the DataBind method explicitly like this:

Me.GridView1.DataSource = northwind.OrdersMe.GridView1.DataBind()

ASP.NET 4.6 inherits some goodies from its predecessor to help you write both declarative and runtime data-binding code, offering strongly typed data controls and model binding.

Strongly Typed Data Controls

When data-binding at runtime, it is useful to specify the type of the data to which the control is bound. Visual Studio ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.