I want to write the router of my sigin page, please any help?
here is the page
protected void ValidateUser(object sender, EventArgs e)
{
string constr = ConfigurationManager.ConnectionStrings["DB"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("ValidateUser"))
{
using (SqlDataAdapter sda = new SqlDataAdapter())
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Email", LoginINNOVATION.UserName);
cmd.Parameters.AddWithValue("@Password", Encrypt(LoginINNOVATION.Password));
cmd.Connection = con;
con.Open();
userName = Convert.ToString(cmd.ExecuteScalar());
con.Close();
}
if (!string.IsNullOrEmpty(userName) && userName != "-1" && userName != "-2")
{
FormsAuthentication.RedirectFromLoginPage(LoginINNOVATION.UserName, LoginINNOVATION.RememberMeSet);
Session["userName"] = userName;
}
else
{
switch (Convert.ToInt32(userName))
{
case -1:
LoginINNOVATION.FailureText = "Username or password not correct.";
break;
case -2:
LoginINNOVATION.FailureText = "Account has not been activated.";
break;
}
}
}
}
}
http://localhost:8282/Account/SignIn.aspx
I saw the example in this site but still dont know how to go about it
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/url-routing