Hi i have a simple custom member ship provider:
Can anyone help me with a simple if statement or switch case where i can route administrators to one page and users to another?
I am currently using the asp.net login controls and dont see how i can specify two different locations depending on the user.
Many Thanks
Grant
my login code:
public override bool ValidateUser(string username, string password)
{
SqlConnection conn = new SqlConnection(_connectionString);
try
{
conn.Open();
string sSQL = "select * from users where U_Name = @username and U_password = @password";
SqlCommand comm = new SqlCommand(sSQL, conn);
comm.Parameters.AddWithValue("@username", username);
comm.Parameters.AddWithValue("@password", password);
SqlDataReader dr = comm.ExecuteReader();
if (dr.HasRows)
{
return true;
}
else
{
return false;
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}