Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
22198 Points
3463 Posts
May 12, 2009 09:24 PM|LINK
There is No- membership attribute to meet your requirment.
You can convert Login Control to Template and try removing the UserName controls but I belive that is going to throw an exception.
So you can simply place a Label (Password), Textbox (txtPassword) and a Button (btnLogin).
Now in the btnLogin Click explicitly call Membership.ValidateUser("someUsername", txtPassword.Text)
and if it returns true set Expliclity FormsAuthentication Cookie by calling FormsAuthentication.SetAuthCookie("SomeUserName", false)
guru_sarkar
All-Star
22198 Points
3463 Posts
Re: [Membership] Attribute to remove the user name field from the login box
May 12, 2009 09:24 PM|LINK
There is No- membership attribute to meet your requirment.
You can convert Login Control to Template and try removing the UserName controls but I belive that is going to throw an exception.
So you can simply place a Label (Password), Textbox (txtPassword) and a Button (btnLogin).
Now in the btnLogin Click explicitly call Membership.ValidateUser("someUsername", txtPassword.Text)
and if it returns true set Expliclity FormsAuthentication Cookie by calling FormsAuthentication.SetAuthCookie("SomeUserName", false)