Author: prachinsoparkar | Posted on: 12/10/2008 3:57:45 AM | Views : 332

Hi,

 I am looking for a solution to my query. The query is I have two drop down list on my page one for categroy and other for products. Both are populated from xml files. Ther code used to populate the data is given below

 Dim ddldataset As New DataSet
 ddldataset.ReadXml("Static Data\Category.xml")
 drpdwnlstCategory.DataSource = ddldataset
 drpdwnlstCategory.DataTextField = ddldataset.Tables(0).Columns(0).ColumnName.ToString
 drpdwnlstCategory.DataValueField = ddldataset.Tables(0).Columns(0).ColumnName.ToString
 drpdwnlstCategory.DataBind()
 ddldataset.Clear()

Dim ddldataset As New DataSet
 ddldataset.ReadXml("Static Data\Products.xml")
 drpdwnlstProducts.DataSource = ddldataset
 drpdwnlstProducts.DataTextField = ddldataset.Tables(0).Columns(0).ColumnName.ToString
 drpdwnlstProducts.DataValueField = ddldataset.Tables(0).Col ...

Go to the complete details ...