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
-
Sheduling and sending mails asp.net
by mr_rajesh86 (0 replies)
-
asp.net add datarow to existing dataset table
by janetb (1 replies)
-
Buy cheap Xanax overnight. Cheap Xanax. Overnight delivery of Xanax in US no prescription needed. Cheapest Xanax.
by asleymar (0 replies)
-
Buy Soma online without a prescription. Soma drug no prescription. How to get Soma prescription. Soma cod accepted.
by asleymar (0 replies)
-
Cheap online order Fioricet. Cheap discount Fioricet. Offshore Fioricet online. How to buy Fioricet online without a prescription.
by asleymar (0 replies)
Related podcasts
-
StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team
Scott chats with Jeff Atwood of CodingHorror.com and most recently, StackOverflow.com. Jeff and Joel Spolsky and their technical team have created a new class of application using ASP.NET MVC. What works, what doesn't, and how did it all go down?
Events coming up
-
Mar
15
DevWeek 2010
London, United Kingdom
DevWeek is Europe’s leading independent conference for software developers, database professionals and IT architects, and features expert speakers on a wide range of topics, including .NET 4.0, Silverlight 3, WCF 4, Visual Studio 2010, REST, Windows Workflow 4, Thread Synchronization, ASP.NET 4.0, SQL Server 2008 R2, LINQ, Unit Testing, CLR & C# 4.0, .NET Patterns, WPF 4, F#, Windows Azure, ADO.NET, Entity Framework, Debugging, T-SQL Tips & Tricks, and more.
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.
This thread is for discussions of Implementing two-way Data Binding for ASP.NET.