D
Dotnetdev
Hi Friends,
Please need your help in solving this issue.
I have a dropdown list which is connected to an XML file and it has another
connection(secondary datasource) which actually have the data is a web
service.
My connection names are "MainDS" - connection to xml file & secDS -
connection to web service.
I need to fill the drop down list. I tried this code. I get Null reference
error.
XPathNavigator mainnav = MainDataSource.CreateNavigator();
XPathNavigator myname1 =
mainnav.SelectSingleNode(""dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite/s0:Users/s0:User", NamspaceManager);
//XPathNavigator myname1 =
mainnav.SelectSingleNode("/my:myfields/my:myField1", NamspaceManager);
XPathNavigator secds = this.DataSources["Users"].CreateNavigator();
XPathnavigator myname2 =
secds.SelectSingleNode("dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite);
myname1.InnerXML = myname2.InnerXML();
where dfs:...... is XPath of the corresponding datasources.
I got a NullReference error. Please help me. I'm in urgent need of it.
Note: Even tried the commented code instead of the code above that. Even
that returned null reference.
Please help
Thanks in advance
Please need your help in solving this issue.
I have a dropdown list which is connected to an XML file and it has another
connection(secondary datasource) which actually have the data is a web
service.
My connection names are "MainDS" - connection to xml file & secDS -
connection to web service.
I need to fill the drop down list. I tried this code. I get Null reference
error.
XPathNavigator mainnav = MainDataSource.CreateNavigator();
XPathNavigator myname1 =
mainnav.SelectSingleNode(""dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite/s0:Users/s0:User", NamspaceManager);
//XPathNavigator myname1 =
mainnav.SelectSingleNode("/my:myfields/my:myField1", NamspaceManager);
XPathNavigator secds = this.DataSources["Users"].CreateNavigator();
XPathnavigator myname2 =
secds.SelectSingleNode("dfs:myFields/dfs:dataFields/s0:GetUserCollectionFromSiteREsponse/s0:GEtUserCollectionFromSiteResult/s0:GetUserCollectionFromSite);
myname1.InnerXML = myname2.InnerXML();
where dfs:...... is XPath of the corresponding datasources.
I got a NullReference error. Please help me. I'm in urgent need of it.
Note: Even tried the commented code instead of the code above that. Even
that returned null reference.
Please help
Thanks in advance