Last active
January 25, 2016 17:45
-
-
Save ciphertxt/14dccf9033af83a39a29 to your computer and use it in GitHub Desktop.
Updates an AD FS 2.0 Login page (FormsSignin.aspx) to autopopulate the user name and set the password focus. * http://mikepfeiffer.net/2012/05/useful-cutomizations-to-ad-fs-2-0-when-deploying-sso-with-office-365/
* https://msdn.microsoft.com/en-us/library/ee895357.aspx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void Page_Load( object sender, EventArgs e ) | |
{ | |
if (!this.IsPostBack) | |
{ | |
// Extract the username fromt he query string and set the username TextBox | |
string url = Context.Request.Url.AbsoluteUri; | |
System.Collections.Specialized.NameValueCollection parameters = System.Web.HttpUtilitiy.ParseQueryString(url); | |
string userName = parameters["username"]; | |
if (!String.IsNullOrEmpty(userName)) | |
{ | |
UsernameTextBox.Text = userName; | |
PasswordTextBox.Focus(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment