TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ariez
NA
34
0
Editing in XML
Jun 14 2010 6:34 AM
i want to give administrator of my website the privilege to change his password tht is stored in xml.the administrator types the new password in "NewPass.Text" and then retype the password in "ConfirmNewPass.Text". We have successfully compared the condition in the "IF" statement.The problem is inserting the password into xml(underlined).Please correct me how to insert the password into xml.
here is the piece of code.
string strFilePath = "F:\\Project\\XMLFile.xml";
XmlTextWriter write = new XmlTextWriter(strFilePath,System.Text.Encoding.UTF8);
XmlTextReader xr = new XmlTextReader(strFilePath);
XmlDocument adm = new XmlDocument();
adm.Load(xr);
XmlNode nod = adm.FirstChild.NextSibling.FirstChild.FirstChild.NextSibling;
string a = nod.InnerText;
if (NewPass.Text == ConfirmNewPass.Text)
write.WriteElementString(nod.InnerText, NewPass.Text);
Response.Write("<script>alert('Password Changed Successfully')</script>");
Reply
Answers (
5
)
login session
updating records using ACCESS