Read/Write to XML in C#

Posted on 2008-11-06
Last Modified: 2012-06-27
I am new to C#/XML and I am trying to read/update (write to) an XML file with C# with a ASP.NET webpage.  I have developed parts of my webpage and the XML file.  I am trying to figure how i can display the info from the XML file onto my page and also have an Add button on the webpage that will add information to the XML file.

Here is my current XML file
<?xml version="1.0" encoding="utf-8" ?>



    <resource_name>John Doe</resource_name>











Open in new window

Question by:szadroga
    1 Comment
    LVL 4

    Accepted Solution

    I can sugget you a couple of ways to do that.
    1)Using Data grid(or Grid view control)
       you could edit the grid to manipulate the xml file.
    Pls read this article for complete steps

    2)There is an control named XmlWebserver control to complete your task.
      Read this article for your reference

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now