private void Expires_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Enter) { DisplayName.Focus(); } }
private void DisplayName_Leave(object sender, EventArgs e) { if (!IsDisplayNameValid()) { DisplayName.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { PasswordMessage.Text = string.Empty; DetailsMessage.Text = string.Empty; AuthenticationSection authenticationSection = (AuthenticationSection)ConfigurationManager.GetSection("system.web/authentication"); if (authenticationSection.Mode != AuthenticationMode.Forms) { Page.Response.Redirect("~/", true);// this page can only be used with forms authentication. AD authentication assumes user managment happens outside the scope of the web application. } if (!Page.IsPostBack) { DisplayName.Focus(); Email.Text = user.Email; DisplayName.Text = user.Comment; } }