loginForm xml file<PLEASE HELP>

The last thing i have to do for my project i am working on is to verify my user name and password on my loginform with the user name and password in my customerc.xml file.

Ive been tryin to get this last part to work for a while and im gettin ne where so i hope one of you guys can help me out a little

-so i want to have the user type in his username in usernametextbox.text and password in passwordtextbox.text then have the program search throu the xml file for a match loginID (username) and password....if no match is found show error message,
and if a match is found then frmCustomermaintenance.show

Replies To: loginForm xml file<PLEASE HELP>

Re: loginForm xml file<PLEASE HELP>

Posted 26 February 2009 - 12:42 PM

What exactly are you looking for help with?

How I would do it is I would load the file using the System.Xml.Document class, then search for the right user with SelectSingleNode and XPath, get the password similarly (if I found the user), and compare the two. That's less than 10 lines of code without significant exception handling (in C# anyway).

But I don't know what you've learned in class/what you're expected to use to accomplish the XML reading.

Re: loginForm xml file<PLEASE HELP>

Posted 26 February 2009 - 01:12 PM

JackOfAllTrades, on 26 Feb, 2009 - 11:42 AM, said:

What exactly are you looking for help with?

How I would do it is I would load the file using the System.Xml.Document class, then search for the right user with SelectSingleNode and XPath, get the password similarly (if I found the user), and compare the two. That's less than 10 lines of code without significant exception handling (in C# anyway).

But I don't know what you've learned in class/what you're expected to use to accomplish the XML reading.

the help i need is how you would get the select single node xpath to work ive read about if but cant get it to work correctly in my program....everytime ive tried i run my program click ok after typing in a login and password and it just explodes.....

can someone give me just an example code, if possible...

THANKS-

JackOfAllTrades, on 26 Feb, 2009 - 11:42 AM, said:

What exactly are you looking for help with?

How I would do it is I would load the file using the System.Xml.Document class, then search for the right user with SelectSingleNode and XPath, get the password similarly (if I found the user), and compare the two. That's less than 10 lines of code without significant exception handling (in C# anyway).

But I don't know what you've learned in class/what you're expected to use to accomplish the XML reading.

the help i need is how you would get the select single node xpath to work ive read about if but cant get it to work correctly in my program....everytime ive tried i run my program click ok after typing in a login and password and it just explodes.....