I have login control, when user completes the registration process, thn i want him to login into his profile bt when he login i want to check the plan for which he registered, i have three plans basic, professinal, and enterprise, according to that only he will be redirected to diffrent plan, how can i do that, i used below code but its not working:
public void login()
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constring"].ToString());
con.Open();
SqlCommand cmd = new SqlCommand("select Email, Password, Edition from SN005ClientTable where Email='" + txtEmail.Text + "' and Password='" + txtPwd.Text + "' ", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
if (dr["Edition"].ToString() == "Basic")
{
Response.Redirect("http://localhost:49165/SalesNucleus/Clients/BasicMyHome.aspx");
}
else if (dr["Edition"].ToString() == "Professional")
{
Response.Redirect("http://localhost:49165/SalesNucleus/Clients/ProfessionalMyHome.aspx");
}
else if (dr["Edition"].ToString() == "Enterprise")
{
Response.Redirect("http://localhost:49165/SalesNucleus/Clients/MyHome.aspx");
}
}
else
{
Label1.Text = "Either Login or password is incorrect";
}
dr.Close();
con.Close();
}