AD FS 2.0 Sign-In Pages Customization - Forms Login Page
Out-of-the-box, the AD FS Sign-In Pages do a decent job, but the user experience can be tweaked to make it a little better, especially for Forms authenticated users.
So, what are the sign-in pages? From MSDN:
Active Directory® Federation Services (AD FS) 2.0 deploys a Web application, called the Sign-In Pages, to handle passive federation requests.
The Sign-In Pages run in Internet Information Services (IIS). They are deployed when the AD FS 2.0 Federation Server Configuration Wizard is run. The pages are located in C:\inetpub\adfs\ls and deployed under the /adfs/ls virtual directory of the Default Web site in IIS
By default, the Forms Sign-In page does not automatically populate any user credentials. So, if I've already typed my user name on another page and been sent to the Forms page, I have to type it again. Thankfully, there is a parameter passed in the query string ("username") which should contain the value for our form. We just need to populate it on behalf of the user.
MSDN again provides some guidance in the area, and even some code to get us started. I'm a fan of modifying only what's needed, so we can leave out a few of the include statements in our FormsSignIn.aspx.cs code-behind and just modify the signature for the Page_Load method (at the expense of typing a little bit more). The following Page_Load method will check to see if the page is posting back (if not, it's our first load) and attempt to populate the UsernameTextBox if the username query string parameter is present.
ADFS FormsLoginPage Class Modification for Username