ASP Chap6
ASP Chap6
Step 2 :- Now open Solution Explorer --> Add a New web Form (Registrationpage.aspx) -->
Drag and drop CreateUserWizard and LoginView controls on the page --> Put a Hyperlink
control inside blank space in LoginView control as shown below:-
Now select Complete from createUserWizard Tasks as shown above --> Now double
click on Continue button and write the following c# codes for Navigation as given
below:-
Step 3 :- Now Add a New Web Form (welcomwpage.aspx) --> drag and drop
LoginName,LoginStatus and LoginView Controls on the page from toolbox as shown below:-
Step 4 :- Now Add again a New Web Form (changepassword.aspx)-->drag and drop
ChangePassword control on the page from toolbox as shown below:-
Step 5 :- Now Add a New web form (PasswordRecovery.aspx) -->drag and drop
Passwordrecovery control from toolbox as shown below:-
Step 6 :- Now open web.config file and write the following codes as given below:-
Step 7 :- Now Run the Application (Press F5) --> Now create a account first for access the
website --> Press Create User button --> After that Press Continue button as shown below:-
Step 8 :- After step 7, login.aspx page will be opened --> Now put login credentials such as
username and password --> Press login button --> You will see the following output as shown
below:-
Using the LoginView control:
The LoginView control allows you to display different information to anonymous and
logged-in users. The control displays one of two templates: the AnonymousTemplate or the
LoggedInTemplate. In the templates, you can add markup and controls that display information
appropriate for anonymous users and authenticated users, respectively.
The LoginView control also includes events for ViewChanging and ViewChanged,
which allow you to write handlers for when the user logs in and changes status.
To add a LoginView control to a page
1. Drag the LoginView control from the Toolbox task pane to your page.
2. By default, the LoginView control includes two templated views that are displayed to the
user. The first is the AnonymousTemplate, which is displayed to the user when the user is
not logged in. The second template is the LoggedInTemplate, which defines the user
interface that is displayed when a user is logged in. But you can also create templates for
the members of particular logged-in role groups.
*****