protected void btn_submit_Click(object sender, EventArgs e) { string aname = txt_username.Text; string pwd = CLASS.PasswordEncryption.EncryptIt(txt_password.Text); IAdmin checklogin = new AdminItems(); int count = checklogin.checkLogin(aname, pwd); if (count != -1) { string roles = ConfigurationSettings.AppSettings["AdminPages"]; CLASS.Authenticate authenticateMe = new budhashop.CLASS.Authenticate(); authenticateMe.AuthenticateUser(aname, roles); // Get the requested page from the url string returnUrl = Request.QueryString["ReturnUrl"]; // check if it exists, if not then redirect to default page if (returnUrl == null) returnUrl = "~/ADMIN/InsertPage.aspx"; Response.Redirect(returnUrl); } else { lbl_submit.Text = HardCodedValues.BuddaResource.LoginFail; } }
protected void btn_submit_Click(object sender, EventArgs e) { string aname = txt_username.Text; string pwd = CLASS.PasswordEncryption.EncryptIt(txt_password.Text); IAdmin checklogin = new AdminItems(); int count = checklogin.checkLogin(aname, pwd); if (count != -1) { string roles = ConfigurationSettings.AppSettings["AdminPages"]; CLASS.Authenticate authenticateMe = new budhashop.CLASS.Authenticate(); authenticateMe.AuthenticateUser(aname, roles); // Get the requested page from the url string returnUrl = Request.QueryString["ReturnUrl"]; // check if it exists, if not then redirect to default page if (returnUrl == null) { returnUrl = "~/ADMIN/InsertPage.aspx"; } Response.Redirect(returnUrl); } else { lbl_submit.Text = HardCodedValues.BuddaResource.LoginFail; } }