Vignesh Kumar

Vignesh Kumar

  • NA
  • 1k
  • 403k

check for user account if exits

Oct 26 2016 3:17 AM
Hi,
 
I have a datatable like shown below
 
User             Password
user1                pwd1
pwd1                pwd2 
 
I have two textbox where the user will enter user name and password.
How can I check if user name matches and password is entered wrongly.

var userPassword = (from m in dt.AsEnumerable() where m.Field<string>("User") == Usr && !(m.Field<string>("Password") == sPwd)

select m).Any();

 

Answers (5)