You will update the categories Grid View to let the user update categories.In this exercise, you will learn about the new data validation features in ASP. You will check out the new unobtrusive validation features in Web Forms.Setting the Item Type property causes two new typed variables to be generated in the scope of the data-binding expressions: Item and Bind Item.

gridview updatepanel not updating-58

In this task, you will discover the new strongly-typed bindings available in ASP. One downside with the above approaches is that the calls to Eval() and Bind() are late-bound - meaning you pass strings to represent the property names.

This means you don't get Intellisense for the member names, support for code navigation (like Go To Definition), nor compile-time checking support.

However if your scenario required custom code for handling the data, you needed to use the Object Data Source and this brought some drawbacks.

For example, you needed to avoid complex types and you needed to handle exceptions when executing validation logic. NET Web Forms the data-bound controls support model binding.

NET to compare the HTML code generated by both configurations. NET 4.5 introduces data annotations validation for Web Forms.

Instead of having a validation control on each input, you can now define constraints in your model classes and use them across all your web application.

With unobtrusive validation enabled, your HTML code will look cleaner and tidier.

In this section, you will enable unobtrusive validation in ASP.

To install the code snippets run .\Source\Setup\Code file.