Custom Data Binding for Server Controls
page 7 of 7
by Justin Lovell
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 35724/ 84

An Ending Note

All I did in this article is demonstrating the basics of data binding and some collection management in server controls. Obviously, you can add more binding features like XML and such but that will take some code. You might not even like the idea of the internal data source being a DataTable but you are free to turn to another “medium”… as long as it can be an offline abstract of the data (like XML).

 

To summarize the article:

 

  1. Manipulate the given data in the DataSource property into one data type. For example, transform it into a DataTable.
  2. Use the transformed data to populate the sub-controls.
  3. Bind the sub-data to the
  4. Save the transformed data into view state so it can be used during post backs.

 

You might want to watch Scott Mitchell for a while because he is also going to roll out a similar article at the ASP.NET Dev Centre.

 

Happy Programming!


View Entire Article

User Comments

Title: Great Article!   
Name: NiQuil
Date: 2010-01-18 9:53:29 AM
Comment:
This helped me a lot! I am totally new to programming and this has been a great tutorial for me.
I am creating my own control library with databound controls, with XHTML output and taking into account the 125 (very) strict rules for the Dutch Government Guidelines for the web.

I noticed this is a Visual studio 2003 (?) project since I had to convert it to my 2008.

Isthis still "the way to go" on this subject, or have new developments, maybe on Microsoft's part, on this subject seen the light of day?

Kind regards,

NiQuil
Title: Why Doesn't It Work   
Name: Marc
Date: 2009-06-04 3:09:50 PM
Comment:
My TitleDescriptionItems never display. CreateChildControlsnever gets hit. Why?
Title: DataSourceID   
Name: Andrew
Date: 2008-06-20 11:11:26 AM
Comment:
Great article, however I was wondering how would one implement the DataSourceID and DataMember properties?

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2021 ASPAlliance.com  |  Page Processed at 2021-02-24 1:00:46 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search