using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Security; public partial class Account_Login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]); Page.Validate(); if (!Page.IsValid) { return; } if (!Page.IsPostBack) { //TextBox textbox = (TextBox)LoginUser.FindControl("UserName"); //textbox.Focus(); SetFocus(LoginUser.FindControl("UserName")); } //if (FormsAuthentication.Authenticate(LoginUser.UserName, LoginUser.Password)) //{ // // Create the ticket, add the cookie to the response, // // and redirect to the originally requested page // FormsAuthentication.RedirectFromLoginPage(LoginUser.UserName, false); //} //else //{ // LoginUser.FailureText = "Your login attempt was not successful. Please try again."; //} } }