Data List question

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Howdy,

I have a datalist(datalist1) that is getting data from an xml
file(query1.xml)
Here is the layout of the xml file.
How do I binding the xml file to display all the supporters/name
<query1>

<supporters>

<Name>xxxxxx xxxxxxxx</Name>

</supporters>

....

....
 
Hi Aaron,
You cna bind it to a Datalist by doing below:-

sub Page_Load(sender as Object, e as EventArgs)
Dim myDataSet as New DataSet()
myDataSet.ReadXml(Server.MapPath("query1.xml"))
Your DataList.DataSource = myDataSet
YourDataList.DataBind()
end sub
<asp:datalist id="YourDataList" runat="server" />

Hope that helps
Patrick
 
Back
Top