Wednesday, July 30, 2008

binding xml values in gridview

using System.Xml;
using System.Data.SqlClient;

protected void Page_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ds.ReadXml(MapPath("XMLFile.xml"));
GridView1.DataSource = ds;
GridView1.DataBind();
}

1 comment:

Anonymous said...

This code s very useful