before checking the login name and password from the textbox, get the data from the sql table into datatable as shown below
using (SqlCommand command = new SqlCommand("SELECT UserName, Password FROM TableName WHERE UserName = '" + txtUserName.Text + "' AND Password = '" + txtPassword.Text + "'", connection))
{
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
if(reader.GetString(1) == txtUserName.Text && reader.GetString(2) == txtPassword.Text)
{
Response.Redirect("Admin/HomeUser.aspx");
}else
{
Response.Redirect("Tester/TesterWorkStatus.aspx");
}
}
}
Hope this will give you an idea...