how to update xml data with textbox



This is my xml file and I am attempting for practice at creating a change password function.



<?xml version="1.0" encoding="utf-8" ?>
<customers>
<customer id="1">
<username>ef</username>
<password>eefer</password>
</customer>
<customer id="2">
<username>efewf</username>
<password>ewfwf</password>
</customer>
</customers>


From a login page a customer is logged into index page where their session is stored as a string like, string username = Session["username"].ToString(); and displayed on the page.


How can I change customer's password based on the username logged in? So far I have this form:



<asp:TextBox ID="newpass" runat="server"></asp:TextBox>
<asp:TextBox ID="confpass" runat="server"></asp:TextBox>
<asp:Button ID="change" runat="server" Text="Button" OnClick="change_Click" />
<asp:Label ID="msg" runat="server" Text=""></asp:Label>

No comments:

Post a Comment