I have set up a small test project to investigate the use of XML files in ASP.NET pages.
I have written code which quite happily creates an XML file based on the contents of a Dataset using the WriteXML method.
I am now trying to populate a datagrid based on the contents of an XML file using the ReadXML method, this is where I am having problems. Each time I run the page I get the following error triggered when I call the DataBind method:
"The IListSource does not contain any data sources"
I am assuming that this is because the dataset is empty. The code I am using to populate the dataset is:
Dim strFileName As String = "D:\Development\IS_DEV\ASP_NET\jobshop\XMLfiles\Datagrid.xml"
DataSet2.ReadXml(strFileName, XmlReadMode.IgnoreSchema)
DataGrid1.DataSource = DataSet2
DataGrid1.DataBind()
Can anyone help?
I have written code which quite happily creates an XML file based on the contents of a Dataset using the WriteXML method.
I am now trying to populate a datagrid based on the contents of an XML file using the ReadXML method, this is where I am having problems. Each time I run the page I get the following error triggered when I call the DataBind method:
"The IListSource does not contain any data sources"
I am assuming that this is because the dataset is empty. The code I am using to populate the dataset is:
Dim strFileName As String = "D:\Development\IS_DEV\ASP_NET\jobshop\XMLfiles\Datagrid.xml"
DataSet2.ReadXml(strFileName, XmlReadMode.IgnoreSchema)
DataGrid1.DataSource = DataSet2
DataGrid1.DataBind()
Can anyone help?