DropDownList and XML file
-
Has anyone figured out how to attach an XML file as a datasource for a DropDownList control? For instance, a list of 50 states and state codes to populate a state dropdownlist in a shopping cart.
ChrisWFL wrote: Has anyone figured out how to attach an XML file as a datasource for a DropDownList control? For instance, a list of 50 states and state codes to populate a state dropdownlist in a shopping cart. It all depends what your XML looks like , but you can just ReadXml() on a clean dataset and add the Table as the datasource. I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
-
ChrisWFL wrote: Has anyone figured out how to attach an XML file as a datasource for a DropDownList control? For instance, a list of 50 states and state codes to populate a state dropdownlist in a shopping cart. It all depends what your XML looks like , but you can just ReadXml() on a clean dataset and add the Table as the datasource. I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
Thanks, that worked. I was trying not to need a DataSet, but I ended up needing one for another reason anyway. Also, I was trying to use the XML services and get a table back instead of the (proper) other way around of creating a table by reading the XML.