Hi,
I am quite a new to the ASP.NET field and trying to populate a gridview with data from xml file.
I have already done this using code bihind(C#) when the xml file is simple, like below:
Dennys
730 W. Carson St.
Torrance
CA
90502
5625555555
4
The best burger joint in California!
And code bihind:
protected void GridView1_PreRender(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("RestaurantData.xml"));
GridView1.DataSource = ds;
GridView1.DataBind();
}
But say if I have multiple child of a node in the XML file, say,
Dennys
730 W. Carson St.
Torrance
CA
5625555555
www.tcs.com
Then how to load this data(phone & website) in a gridview column using code behind(C#)? And what else I have to do with my aspx page also?
Please help!
View Complete Post