So I created a custom generated file that lets me take the username and password.
It is the following:
public User GetUserByUserNamePassword(string userName, string Password)
{
return (_DatabaseContext.Users.FirstOrDefault(user => user.Username == userName && user.Password ==Password));
}
In my log in page I have a webUserControl that contains two textboxes, one for the password and the other one for the username. I created an object data source for the webusercontrol to take in parameters Username and password .
Whats the c# code that can let me check if the username and password are valid (I have a table called User btw that has three columns, UserID(pk), Username and Password.