Xml and XmlTextReader.Read() method
Hi everyone:
Here i'm trying to create login acounts as xml file and i'm have a windows app. with two textboxes and a button, what i want is: when a user enters their userName and passWd to the respective textBoxes and clicking the button the following shoukd happen:
an xml reader should read through the xml file and compare textbox valued with the nodes in xml file if they are the same it should pop up a MessageBox.Show("You are logged on")
otherwise ("You are not logged on") here is my
1.Xml file (accounts.xml)
2. Just a piece of code
System.Xml XmlTextReader rdr = new XmlTextReader("accounts.xml");
while(rdr.Read())
{
//perform some comparison here
}
can someone help me please, i'm new to C#, i'm a C/C++ programmer