The ability to bind some elements of a data source with some graphical elements of an application is a feature of the .NET Framework that a huge number of developers have welcomed with open arms. The ADO.NET library of classes provides a common API that Web Forms and Windows Forms applications leverage in order to set up an effective and successful data binding mechanism. However, aside from the common use of ADO.NET classes, the data binding infrastructure is fairly different for Web and Windows Forms applications. The difference in the working model mostly reflects the differences of the underlying platforms and involved protocols.
The Web Forms data binding is essentially stateless, just like the HTTP protocol it relies upon. The binding gets lost as soon as the server page completes its processing and the resulting HTML code is generated. Employing caching techniques can save you from accessing the data source multiple times to refill any data bound controls. However, even caching cannot save your code from restoring any necessary binding when the page is posted back.
Click on the headline to read more.
|