SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Wednesday, May 05, 2004

I need to bind a dropdown list control to some data from an XML document. Initially, I tried to specify the DataSource as a node list and the DataText & DataValue properties to “@attribute_name”. No luck.

Thanks to the internet, I found the ASP.NET DropDownList XML Binder Class from the XML for ASP.Net site. This class is written to read an XML file from the specified path and create the ListItems that are added to the control.  It's not databinding in the same sense as ASP.Net, but it works!

The class uses an XMLTextReader. Since I already have a document, I can use the XMLNodeReader and I'm done. 

Wednesday, May 05, 2004 11:39:55 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009, Paul Schaeflein

Send mail to the author(s) E-mail