DataBinding an Arbitrary XML String to an ASP.Net GridViev
Definitely falls into the category of "simple thing I shoulda memorized years ago", but whatever:
Copy this code and paste it in your HTML
DataSet ds
= new DataSet
();string xml = GetSomeXMLFromWherever();
ds
.ReadXml(new StringReader
(xml
), XmlReadMode
.InferSchema);GridView1.DataSource = ds;
GridView1.DataBind();
Report this snippet
Comments
Subscribe to comments