Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8580693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:52:55+00:00 2026-06-11T20:52:55+00:00

I made a webpage using c# asp.net. It has various text fields and dropdown

  • 0

I made a webpage using c# asp.net. It has various text fields and dropdown lists and a radio button. Now i want to save the data into an xml file. and i’m not really able to understand on how to go about it.

The various attributes in my page are TEXTBOX: GInfo; LNo; Org; UName; SType; Ver; MeapSupp; MaxUser; MaxMach; MachIP; MachMac; UqID

DROPDOWNLIST: LType

RADIO BUTTON: MeapSupp

I’m new to XML and asp.net and c#. Can you please help me out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:52:56+00:00Added an answer on June 11, 2026 at 8:52 pm

    You can use this code – based on XmlTextWriter class

                    XmlTextWriter textWriter = new XmlTextWriter("yourpath", null);
                    // Opens the document
                    textWriter.WriteStartDocument();
    
    textWriter.WriteStartElement("root");
    textWriter.WriteAttributeString("xmlns", "x", null, "urn:1");
    
                    // Write comments
                    textWriter.WriteComment("First Comment XmlTextWriter Sample Example");
    
    textWriter.WriteEndElement();
    
    
                    // Ends the document.
                    textWriter.WriteEndDocument();
                    // close writer
                    textWriter.Close();
    

    Link : http://msdn.microsoft.com/fr-fr/library/system.xml.xmltextwriter.aspx

    You can also use LINQ To XML

     XDocument doc = new XDocument(
            new XDeclaration("1.0", "utf-8", "yes"),
            new XComment("This is a test"),
            new XElement("root")
        );
    
        var root = doc.CreateElement("Test");
        ....
    

    Link : http://msdn.microsoft.com/en-us/library/bb387098.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried using webparts on an asp.net webpage and got a blank screen. While
I have made a Azure web app that has a ASP.NET web that also
What is the best way programatically on a webpage (using jquery/javascript/html/asp.net/css anything realy) to
Im using an embedded webview to display a webpage which is made up of
i made a webpage which use FormsAuthentication. now i need to get the user
I have made this webpage, you can check it out here http://www.bettingtowin.net/webcam.html I have
We are using the Mono (2.10) XSP4 webserver to host an ASP.Net MVC3 web-application
I need to scrape a simple webpage which has the following text: Value=29 Time=128769
I have a webpage made in perl and dojo using a PostgreSQL database. I
I am using asp.net and I need to display a prompt to the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.