Library tutorials & articles
Implementing two-way Data Binding for ASP.NET
Introduction
ASP.NET has raised the bar for Web development considerably with very rich developer functionality built into a flexible and highly extensible object model. For developers who come from a background of hand coding ASP or other scripting or CGI style technology .Net seems almost too good to be true as it reduces a lot of redundant code and simplifies the development process significantly. But one area – simple data binding for controls like textboxes, checkboxes, radio buttons and so on leave a lot to be desired both in terms of ease of use for binding the data as well as providing the ability to read the data back into the data source. In this article Rick examines what's wrong with simple data binding and provides a set of subclasses that make data binding a lot quicker requiring much less manual code.
Data binding tends to be one of the tasks that most developers deal with on a daily basis. Most applications are data centric and whenever you create user interface code that relates to the data you'll find that if you use the default mechanisms of the .Net Framework that you'll do the same things over and over again. Not only that, but .Net really doesn't make data binding as easy as it should be either in Windows Forms or in ASP. Net. In this article, I'll describe briefly how data binding in ASP. Net works and then offer a solution to make the process of data binding much easier by using subclassed controls that handle the repetitive tasks. In a future article I'll then discuss the same issues in Windows Forms.
If you're coming from an ASP or other Web Development background, you're probably thinking “what is Rick talking about?” Data binding in ASP.NET is a huge improvement over whatever I had to do previously in Web forms. After all we do have a form of data binding (actually several forms) in .Net and we have various forms of state management that automatically assign our control values back to the controls so we're free of having manually populate fields with data. Big improvement for sure.
Related articles
Related discussion
-
Stock Exchange Rate
by devart_jamesyang (3 replies)
-
Interested to learn
by Milind_Kansagara (2 replies)
-
Windows XP,Office XP for sale 35 pounds.
by recoversvr (0 replies)
-
Navigation Buttons
by awd (0 replies)
-
question about developerfusion.com
by James Crowley (1 replies)
Related jobs
-
Microsoft .Net Architect
in AMSTERDAM (€50K-€90K per annum) -
Microsoft Dynamics CRM Technical Consultant
in Netherlands (€50K-€90K per annum)
Events coming up
-
Oct
14
What’s New in Visual Studio 2008 Service Pack 1?
Birmingham, United Kingdom
“Service Pack? We’re calling it a Service Pack? Are you kidding??!?!” Visual Studio 2008 Service Pack 1 will release later in 2008 alongside .NET Framework V3.5 Service Pack 1 and, together, they represent a significant upgrade to Visual Studio 2008. There are enhancements across many areas of the .NET Framework such as data access, windows application development and web development and there are also corresponding changes in the development environment to support the new framework features.
wow,
absolute great. It helped me a lot in creating forms during runtime. All controls had to generated from database information. So I neede a way to check bind the values by looping through the whole control collection.
Thanks a lot
http://www.developerfusion.co.uk/forums/images/icon8.gif
http://www.developerfusion.co.uk/forums/images/icon8.gif
Stefan
Great stuff!!!
I find your article really usefull.