How to load an xml data from an xml file?

Tripati_tutu
Posted by Tripati_tutu under ASP.NET category on | Points: 40 | Views : 1679
See the below code sample.
private void loadUsersXmlData()
{
DataSet xmlData = new DataSet();
xmlData.ReadXml(Server.MapPath(@"App_Data\TestXmlFile.xml"));

if (xmlData.Tables.Count > 0)
{
GridViewXmlData.DataSource = xmlData;
GridViewXmlData.DataBind();
}
}

Comments or Responses

Login to post response