Click here to Skip to main content
15,919,423 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

Please let me know if I have a login page in a website i need to send the values from that page to a xml file. How to do it?

there are two values only :
1. username
2. password.

how to create structure of xml file also.
Posted
Comments
Sandeep Mewara 7-Jun-11 12:00pm    
Your purpose is not clear. You want to send data from client to server? server page to another server page? Why?

1 solution

Please don't save passwords to a file, please!

If you are using version 3.5 of the framework or later, Linq to XML makes this fairly easy.

- override OnLoad in the codebehind
- construct an xml document, like:

var Xml = new XDocument(
    new XDeclaration("1.0", "utf-8", "true"),
    new XElement("login",
        new XElement("username", username),
        new XElement("password", IWarnedYou))));
File.Write( etc.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900