Two-way databinding with ASP.net

Tuesday, December 25, 2007

Another article by expert Rick Strahl. “ASP.NET 2.0 includes many new data binding features that can significantly simplify a variety of data binding scenarios. Unfortunately, one very common scenario-simple control data binding-has changed very little. While this is a common scenario in forms-based Web applications, it remains for the most part a manual and time-consuming process.

Simple control data binding refers to the process of binding a single value to a property of a control-for instance, binding form controls like textboxes, checkboxes, radio buttons, or selected values of list controls to individual data or object values. This could benefit significantly from a consistent approach to handling data binding deterministically, as well as managing error trapping and display consistently. In this article, I introduce a custom extender control that can be used to bind any individual value from data or objects to any control property. It can extend and provide designer support for any existing control on a Web Form.

In the process, I’ll demonstrate a flexible and intuitive approach that provides consistent behavior for data binding and unbinding, validation, error handling, and error display in forms-based Web interfaces. I’ll also dig into the details of how the control is built and describe some of the interesting benefits.

The wwDataBinder control addresses simple control data binding. In more concrete terms, the control manages bindings that express concepts such as “bind the value of the DataRow’s CompanyName field to the TextBox’s Text property” or “bind the Item.Entity.Pk property to the SelectedValue property of a DropDown list.” The control manages the process of binding the specified data values to the specified control property, as well as unbinding the value back into the underlying data item. This is true two-way data binding.”

Read the full article hosted by MSDN


 
Indelv.com is for sale!
 
ERP systemen
Alle ERP-systemen op een rij, compleet met ERP-nieuws en ERP-software informatie.
www.ERPcentraal.nl
ERP systemen
Alle ERP-systemen op een rij.
www.erpmatrix.nl

Indelv.com is for sale!

Quick Links
Our Friends
Cool Places
Visit also
About Us