I have this code
protected void loginbutton_Click(object sender, EventArgs e)
{
Int32 d = checkuser(uid.Text, pwd.Text);
if (d == -1)
{
prompt.Visible = true;
prompt.Text = "Unregistered ID. Please make sure that you have a registered account and you have correctly typed in the user ID";
}
else if (d == 1)
{
Server.Transfer("Enrollment.aspx");
}
else if (d == -2)
{
prompt.Visible = true;
prompt.Text = "Incorrect password. Please try again.";
}
}
private Int32 checkuser(string u, string p)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "usp_checkuser";
cmd.Connection = con;
cmd.Parameters.Add("@uid", SqlDbType.NVarChar) ...
Go to the complete details ...