Login Control Example
Example Summary and Logic
The Login control presents a simple HTML form for gathering user credentials. When submitted,
the web server's Membership Provider determines if the credentials are valid correct and valid.
If so, the user is considered "logged in" and, typically, has access to more of the web site than
an anonymous visitor.
The server-side functionality provided by the Login control is useful and does not warrant adaptation.
After all, validating credentials has nothing to do with how the form that gathers those credentials is
presented. So, the goal of the Login control's adapter is to improve the markup used in the form's
presentation without touching the server-side functionality. In particular, the adapted HTML uses
<div> rather than <table> tags to position form elements. Likewise, the adapted HTML avoids
inline CSS styles. (Exception: Internal validators used by the Login control may still
render inline styles even when the sample Login adapter is used.)
Working Example
Hints:
Use the following values when filling out the login form.
- User Name = fred
- Password = css!
If your user name and password are correct, you'll be taken to a page that
demonstrates the LoginStatus control.
Please note that the login form does not display if the user is already logged in.
What would you like to do next?