I am working on registration form in xml, and i need to know how can check the input of the username textbox value if excites in the user.xml data.
Like if someone input Luckas as username in the registration form, i need check if is there another username with Luckas registered before in the xml data.
khayalian
Member
127 Points
143 Posts
checking the value
May 06, 2012 08:22 PM|LINK
Hello
I am working on registration form in xml, and i need to know how can check the input of the username textbox value if excites in the user.xml data.
Like if someone input Luckas as username in the registration form, i need check if is there another username with Luckas registered before in the xml data.
Thank you any suggestions.
Ramesh T
Contributor
5121 Points
827 Posts
Re: checking the value
May 06, 2012 11:06 PM|LINK
Love LINQ?, try this
XDocument xDoc = XDocument.Load(@"Ur xml path"); if ((from node in xDoc.Descendants("UserName") where node.Value == "Luckas " select node).Count() > 0) { } else { }