<head> <script runat="server"> protected void Page_Load(object sender, EventArgs e) { if (String.IsNullOrEmpty(Request.QueryString["logoff"]) == false && Request.QueryString["logoff"].ToLowerInvariant() == "true") { FormsAuthentication.SignOut(); ErrorMessage.Text = "You have been signed out"; ErrorMessage.Visible = true; } } protected void LogIn_Clicked(object sender, EventArgs e) { string username = Request.Form["username"]; string password = Request.Form["password"]; bool remember = RememberMe.Checked; if (FormsAuthentication.Authenticate(username, password)) { FormsAuthentication.RedirectFromLoginPage(username, createPersistentCookie: remember); } else { ErrorMessage.Visible = true; } } </script>
FormsAuthentication.RedirectFromLoginPage(username, remember);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)