why do i get "System.NullReferenceException: Object reference not set to an instance of an object"
on this :
Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
If System.IO.File.Exists(Server.MapPath("/test.xml") Then
doc.Load(Server.MapPath("/test.xml")
Dim root As System.Xml.XmlNode = doc.DocumentElement
Else
Dim root As System.Xml.XmlNode = doc.DocumentElement
Dim comments As System.Xml.XmlElement = doc.CreateElement ("testa"
root.AppendChild(comments)
End If
?? ( on the line root.Appendcild(comments) ?)
Edward@de-leau.com
on this :
Dim doc As System.Xml.XmlDocument = New System.Xml.XmlDocument()
If System.IO.File.Exists(Server.MapPath("/test.xml") Then
doc.Load(Server.MapPath("/test.xml")
Dim root As System.Xml.XmlNode = doc.DocumentElement
Else
Dim root As System.Xml.XmlNode = doc.DocumentElement
Dim comments As System.Xml.XmlElement = doc.CreateElement ("testa"
root.AppendChild(comments)
End If
?? ( on the line root.Appendcild(comments) ?)
Edward@de-leau.com