Use namespace System.IO
VB.NET
dim ds as new DataSet()
dim fs as FileStream = new FileStream (Server.MapPath ('products.xml'),FileMode.Open , FileAccess.Read )
ds.ReadXml (fs)
DataGrid1.DataSource = ds
DataGrid1.DataBind ()
C#
DataSet ds= new DataSet ();
FileStream fs = new FileStream (Server.MapPath ('products.xml'),FileMode.Open , FileAccess.Read );
ds.ReadXml (fs);
DataGrid1.DataSource = ds;
DataGrid1.DataBind ();
Share with