S
Sandy
I've saved an xml string into a file and loaded it into a
dataset then displayed it into a datagrid:
XmlDocument doc = new XmlDocument();
doc.loadXml(stringXml);
doc.Save(Server.MapPath("data.xml");
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("data.xml");
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
I'm having issues because in some situations there is no
data, ie stringXml with be an empty file such as
<contacts />
The application I'm working in doesn't debug but just
gives me an application error.
Can someone help me still display an empty datagrid
without causing an error?
Thanks!
dataset then displayed it into a datagrid:
XmlDocument doc = new XmlDocument();
doc.loadXml(stringXml);
doc.Save(Server.MapPath("data.xml");
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("data.xml");
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
I'm having issues because in some situations there is no
data, ie stringXml with be an empty file such as
<contacts />
The application I'm working in doesn't debug but just
gives me an application error.
Can someone help me still display an empty datagrid
without causing an error?
Thanks!