You can use the ASP. NET login control to create a logon page. This control extracts the user name and password and uses ASP. Net membership and forms authentication to authenticate the user's creden。 and create an authentication ticket.
1. Create an ASP. NET web application that uses ASP. NET membership. For more information and examples, see configuring ASP. NET Applications to use membership.
2. Create an ASP. NET webpage in the login. aspx application.
Note: by default, ASP. NET Forms authentication is configured to use a page named login. aspx. You can use the loginurl attribute to change the default logon Page name in the web. config file of the application.
3. Add a login control to the page.
4. You can also set the destinationpageurl attribute of the control to the name of the page to which the user will be redirected after logon. If the value is not specified for the destinationpageurl attribute, the user will be redirected to the original requested URL after authentication.
The following example demonstrates the tag of the login control:
<Asp: Login
Id = "login1"
Runat = "server"
Destinationpageurl = "~ /Membershome. aspx ">
</ASP: Login>