I am trying to insert my data to a webservice.
while submitting my submit button on my website. and i am checking whether there is an error:
if (Convert.ToString(strXML) != "1")
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(strXML.ToString());
XmlNode node = xmlDoc.SelectSingleNode("Logic/Errors");
err = node["Error"].InnerText;
}
But now i am getting an error :
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request.
Please review the stack trace for more information about the error and where
it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to
an instance of an object.
can anyone help me ???
nodeis null - debug your code , step by step... the single node is not found for some reason.