compiling the code below i get the error:-
Cannot implicitly convert type 'object'to 'System.Xml.Xml Document'
I'm getting the error on this line:-
myXml.Document = getXML("http://www.crn.com.au/rss.aspx?SCID=9 ");
Any ideas?
private void Page_Load(objec t sender, System.EventArg s e)
{
// Put user code to initialize the page here
myXml.Document = getXML("http://www.crn.com.au/rss.aspx?SCID=9 ");
}
object getXML(string sourceFile)
{
System.Net.WebR equest myRequest =
System.Net.WebR equest.Create(s ourceFile);
System.Net.WebR esponse myResponse = myRequest.GetRe sponse();
System.Xml.XmlT extReader myReader = new
System.Xml.XmlT extReader(myRes ponse.GetRespon seStream());
System.Xml.XmlD ocument doc = new System.Xml.XmlD ocument();
doc.Load(myRead er);
getXML = doc;
myResponse.Clos e();
myReader.Close( );
}
*** Sent via Developersdex http://www.developersdex.com ***