How to Create a Web Login Interface With Visual Basic Net

Visual Basic Net (VB.NET) is a Microsoft language that lets you create web applications. Web applications that require authorization to access certain information need a login page. Your login page verifies a user's name and password, places a cookie on the user's computer so he can return later, and uses database queries to retrieve the personal information for the user. These are some of the features that require consideration when creating the login screen.

Instructions

    • 1

      Create the .NET web form. A general login form requires user name and password text boxes. You need a "Login" button to trigger the event, and some login forms have a check box where a cookie is saved if the user does not want to log in each time the page is accessed.

    • 2

      Create a database link. User names and passwords are stored in a database on your host server. The code must include a link to your database. This link is used to query the database and verify that the website visitor has entered the correct user name and password into the text boxes.

    • 3

      Verify that the user enters a user name and password. Before you waste database resources, you want to make sure a user didn't just click the "Login" button without first entering a login name and password. This saves resources on your database. You check for these entries in the code that runs when the user clicks the "Login" button.

    • 4

      Create the database stored procedure that checks the user name and password. Stored procedures are small code functions that retrieve data from the tables. You need a stored procedure that receives a user name and password, checks the entries' accuracy, and returns an "OK" to the login form code.

    • 5

      Add the cookie or create a session variable. A session variable is a unique key on the server. The key is unique, because no other user has this session ID. You save the user name in the session, so you can verify that the user is logged in on all pages that require user authentication.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured