Click here to Skip to main content
15,919,434 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: how to insert the data into xml file using asp.net with vb.net Pin
sumit703424-Feb-10 20:22
sumit703424-Feb-10 20:22 
Questionhow to insert the data into xml file using asp.net with vb.net [modified] Pin
vbmadhavi24-Feb-10 20:00
vbmadhavi24-Feb-10 20:00 
hello everybody.

i want to insert the data into xmlfile.how it possible.
i developed code for this .but i dont know whether it is correct or not.

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
' Create xml dom
Dim XMLDom As New XmlDocument()
'this xml file is already i created.
XMLDom.Load("D:\XMLFILE1.xml")
'Selecting the main node
Dim newXMLNode As XmlNode = XMLDom.SelectSingleNode("persons")
'''''''get the node where i want to insert the data
Dim childNode As XmlNode = XMLDom.CreateNode(XmlNodeType.Element, "p", "")
''''''''In the below step "p" is my node name and "sree" is my data to insert
Dim newAttribute As XmlAttribute = XMLDom.CreateAttribute("p", "sree", "")
childNode.Attributes.Append(newAttribute)
newXMLNode.AppendChild(childNode)
end sub
when i run this code error occured i.e

Object reference not set to an instance of an object.
this error is occured in newXMLNode.AppendChild(childNode)
modified on Thursday, February 25, 2010 2:09 AM

AnswerRe: how to insert the data into xml file using asp.net with vb.net Pin
Prosanta Kundu online24-Feb-10 20:34
Prosanta Kundu online24-Feb-10 20:34 
QuestionMake url clickable in DIV Pin
sumit703424-Feb-10 19:36
sumit703424-Feb-10 19:36 
AnswerRe: Make url clickable in DIV Pin
Prosanta Kundu online24-Feb-10 20:36
Prosanta Kundu online24-Feb-10 20:36 
GeneralRe: Make url clickable in DIV Pin
sumit703424-Feb-10 20:42
sumit703424-Feb-10 20:42 
GeneralRe: Make url clickable in DIV Pin
Haroon Sarwar25-Feb-10 0:38
Haroon Sarwar25-Feb-10 0:38 
AnswerRe: Make url clickable in DIV Pin
April Fans3-Mar-10 14:22
April Fans3-Mar-10 14:22 
QuestionMessaebox not showing in Ajax UpdatePanel Pin
bhushanl24-Feb-10 18:20
bhushanl24-Feb-10 18:20 
AnswerRe: Messaebox not showing in Ajax UpdatePanel Pin
Prosanta Kundu online24-Feb-10 18:41
Prosanta Kundu online24-Feb-10 18:41 
GeneralRe: Messaebox not showing in Ajax UpdatePanel [modified] Pin
bhushanl25-Feb-10 17:34
bhushanl25-Feb-10 17:34 
QuestionSyntax Error in NEW vb.net Pin
raquidd2224-Feb-10 12:21
raquidd2224-Feb-10 12:21 
AnswerRe: Syntax Error in NEW vb.net Pin
Bharat Jain25-Feb-10 2:25
Bharat Jain25-Feb-10 2:25 
QuestionSetting up multiple asp.net websites under a single solution? Pin
Goalie3524-Feb-10 10:15
Goalie3524-Feb-10 10:15 
QuestionGet Session in Ashx handler in MVC asp.NET application Pin
Sandeep Akhare24-Feb-10 9:44
Sandeep Akhare24-Feb-10 9:44 
QuestionAJAX ScriptManager.EnablePartialRendering does not seem to work? [modified] Pin
mhp13024-Feb-10 9:29
mhp13024-Feb-10 9:29 
QuestionHow to Save a webpage in to PDF in dotnet1.1 Pin
K.Safvi24-Feb-10 6:44
K.Safvi24-Feb-10 6:44 
AnswerRe: How to Save a webpage in to PDF in dotnet1.1 Pin
Pranay Rana24-Feb-10 17:41
professionalPranay Rana24-Feb-10 17:41 
Questionhow to find the login time and logout time using triggers in sql server2005 Pin
developerit24-Feb-10 6:40
developerit24-Feb-10 6:40 
AnswerRe: how to find the login time and logout time using triggers in sql server2005 Pin
Not Active24-Feb-10 8:55
mentorNot Active24-Feb-10 8:55 
AnswerRe: how to find the login time and logout time using triggers in sql server2005 Pin
Goalie3525-Feb-10 5:26
Goalie3525-Feb-10 5:26 
Questionhow to use charts in crystal reports using asp.net with c# Pin
developerit24-Feb-10 6:34
developerit24-Feb-10 6:34 
AnswerRe: how to use charts in crystal reports using asp.net with c# Pin
i gr824-Feb-10 19:13
i gr824-Feb-10 19:13 
Questionclick a button on a webcontrol but retain focus of current control on the form Pin
thedom224-Feb-10 1:58
thedom224-Feb-10 1:58 
AnswerRe: click a button on a webcontrol but retain focus of current control on the form Pin
R. Giskard Reventlov24-Feb-10 2:24
R. Giskard Reventlov24-Feb-10 2:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.