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.
The ": " used in the expression will automatically HTML-encode the output to avoid security issues (for example, cross-site scripting attacks). NET 4 for response writing, but now is also available in data-binding expressions. NET Web Forms, when you wanted to perform two-way data-binding, both retrieving and updating data, you needed to use a Data Source object.
This could be an Object Data Source, a SQL Data Source, a LINQ Data Source and so on.
In this section, you will learn how to use data annotations for validating a new/edit customer form.
In previous version of Web Forms, handling database errors such as a too long string or a unique key violation could involve throwing exceptions in your repository code and then handling the exceptions on your code-behind to display an error.
You will use data annotations in the application model classes for user input validation, and finally, you will learn how to turn on or off request validation to individual controls in a page.