using System.Data;using System.IO;protected void btnReadXmlFile_Click(object sender, EventArgs e){string filePath = Server.MapPath("~/Employees.xml");DataSet dsData = new DataSet();//If you don't want to read through FileStream then comment below lineFileStream fsReadSchema = new FileStream(filePath, FileMode.Open);dsData.ReadXml(fsReadSchema);fsReadSchema.Close();GridView1.DataSource = dsData;GridView1.DataBind();}
0 comments:
Post a Comment