Preview

Visual Studio 2010 - Working with User Logins

Good Essays
Open Document
Open Document
509 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Visual Studio 2010 - Working with User Logins
This tutorial will focus on creating login functionality to allow for only authenticated users to access our web application as well as provide users with the ability to register to the application.

Working with User Logins
Open a New Project

Create a New ASP.NET Web Application

When your project opens, you would need to make adjustments to your Web.config file. This is an XML file that controls most of the project settings.

You will need to insert or modify the authentication code to reflect the following:

This allows for this website becomes a website that is controlled by an internal database. From here we would need to create a Login page.

Right Click on your project and Select Add New Item and name your Web Form Login.aspx and click Add. Also add another Web Form named RegisterUser.aspx to your project, this will be used to allow new users to register to the application.

With the Login.aspx page open, drag and drop the Login Control from Login group in the Toolbox on to the page.

The next task would be to configure the Login element to allow authenticated users to login to the application.

Registering Users and directing them to Content
Customizing the Login Control
The Login Control Properties would be seen on the Properties Panel shown in the screen below, a number of properties would need to be customised for the control to work properly.

Properties that would require some customization • CreateUserText – This property will display text instructing users to register • CreateUserURL – This property directs users to the page with the CreateUserWizard element • DestinationPageURL – This property directs successful logins to a resource, in this case the Default.aspx page.

Register a New User
Open RegisterUser.aspx and Drag and Drop the CreateUserWizard Control to allow new users to register. Ensure that the FinalDestinationPageURL, which directs the user who completes the registration process to the desired page in

You May Also Find These Documents Helpful