Thursday 22 December 2011

Data binding in ASP.NET

The process of binding data on the server side control that will then render that data in some form to the Client is known basically as data binding in ASP.NET programming.  The only possible constraint for the data binding are that the server-side control must support a property called DataSource and a method called DataBind().

It works in this way: when you add a data binding to an ASP.NET webform, the Visual Studio .NET adds a data binding expression to the ASPX file. When the webform is requested for the first time, the ASPX file is parsed. The data binding event is fired when the controls databind method is called, and the handlers added by the ASP runtime evaluates the data binding expression and performs the actual data binding.

It we are able to ge the data bindings at run time, we could use reflection to perform 2-way data binding. However, there is no way to get the data bindings at runtime.

Yes, the ASP.NET programmers can add properties to the controls to store the data bindings in order to fix that problem. Although it can be an obstruction to make the code very clear, this option is still open.

At SPEC INDIA, our trained team of ASP.NET developers are eager to make very smart and secure use of cookies, thus to ensure the authentication to the browser sessions. It you have any requirement or queries, feel free to drop an email at our id lead@spec-india.com, we will be happy to assist you.

No comments:

Post a Comment