How do we read data from a XML file and display it in a DataGrid ?

 Posted by Chvrsri on 2/10/2012 | Category: Web Services, Remoting Interview questions | Views: 2773 | Points: 40
Answer:

we can do this by using ReadXML method.

DataSet MyDataset= new DataSet ();  

MyDataset.ReadXml (Server.MapPath ("sample.xml"));
MyDataGrid.DataSource =MyDataset;
MyDataGrid.DataBind();


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response