.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> XML >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Add Single Tag Value at Runtime in XML File

Posted By:Narayanan       Posted Date: December 13, 2012    Points: 40    Category: XML    URL: http://www.dotnetspark.com  

Here , I give a Code for Add Single Tag value at Run time in XML File

This is a Method for Add Single Tag Value at Run Time in XML File.
 private void ChangeValueofXMLNodeValue(string XMLPath,string SelectedSingleTag)


            XmlDocument doc = new XmlDocument();


            XmlNode root = doc.DocumentElement;

            XmlNode myNode = root.SelectSingleNode(SelectedSingleTag);

            myNode.InnerText= textBox1.Text ;





Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend