How to Create a Login Page Using ASP.NET
The Microsoft .NET Framework provides a login control that simplifies creation of a login page. The login control is typically used in conjunction with either user authentication tables created using the "aspnet_regsql.exe" utility in Internet Information Services or through creation of a local database in the App_Data folder of the web site. This database must exist before a login page will work successfully. Once this authentication database has been created, the steps to create a login page are relatively easy to perform.
Instructions
-
Access the ASP.NET Website Project
-
1
Open the Visual Studio environment by clicking "Start" and navigating to "All Programs," "Microsoft Visual Studio."
-
2
Click the "File" menu and then click "Open Web Site" or use the "Shift + Alt + O" keyboard shortcut.
-
-
3
Select the site type (e.g., "File System," "Remote Site" or others) and click the "Open" button.
Create the Login Page
-
4
Right-click the site in the "Project Explorer" window and left-click "Add new item."
-
5
Select the "Web Form" template.
-
6
Type "Login.aspx" in the Name textbox and select "Visual C#" or "Visual Basic" as desired from the Language drop-down menu.
-
7
Click the "Add" button.
Add the Login Control
-
8
Expand the "Login" tab in the Toolbox.
-
9
Double-click the "Login" control to add it to the "Login.aspx" page.
-
10
Hover over the control on the page and click the right-pointing arrow that appears.
-
11
Click the "AutoFormat..." link.
-
12
Select a desired scheme from the column and click the "OK" button.
-
1
References
Resources
- Photo Credit Jupiterimages/Polka Dot/Getty Images