"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Friday, August 13, 2010

Binding grid with an xml File in Local system

 Hi frienz,

Bind grid with an Xml file. To load an xml file in asp.net we need to class some header file.

using System.Data;
using System.Xml;


 After that u will get the access to use xml files.
this code will bind Xml with Grid

DataSet ds=new DataSet();
ds.ReadXml("your xml file path here");
Gview.DataSource=ds;
Gview.DataBind();


I think It will help u some way's
Have a nice day... 'N happy Coding :)

No comments: