Create Membership and Login Controls in ASP.NET


Your website might invite visitors to become members so they can get special discounts on products or view private documents. To sign up these visitors and turn them into members, your website will need membership forms to gather basic information from the visitors and enable them to enter a username and a password to log in to the website. The site will have certain pages that cannot be accessed unless you sign up and become a member. Membership and login controls can be created in ASP.NET using very little code.

  1. Creating a membership page - Select the ASP.NET configuration and click the Security tab and select the Security Setup Wizard. Follow the instructions for configuring security, then when you click Next, select the Internet option. This option will enable users on the Internet to access the membership forms and log in from the web. You have to specify now what sort of role the user will use. This is just like a designation to separate members who will only have access to certain pages and they will only be limited to viewing and not to editing portions of the page. Create a new user on the next page of the wizard; this is where you enter information like your username, password, your email, a security question and answer. The Create User button needs to be clicked. You will get a confirmation notification. The next part of the configuration defines the rules for accessing the MemberPages folders. In the Add New Access Rule Box, choose the MemberPages Folder, then click Anonymous users and click the Deny option for permission, then select Add this Rule and Finish. This will deny non-members access to the pages that are exclusive for members only.
  2. Creating the login page - In the Solution Explorer window, add a web form and name it Login.aspx by right-clicking Web Application and then choosing the Add New Item option. Drag and drop Login from the toolbar to the work area. This is the field where members enter their username and password to gain access to the site. You will now create a welcome message to greet members who log in and a message for users who are not logged in. Drag and drop the LoginView control to the page and click the little arrow button to edit the AnonymousTemplate by typing in "Click Link to Login." For the message that greets logged-in users, go to the LoginView Tasks Panel, then select the LogInTemplate. Select the edit area of LoginView, then type in "You are successfully logged in. Welcome," and then drag LoginName in the template from the toolbar after Welcome.

Membership forms and login fields provide security to your website and the data it provides its members. Creating these functions in ASP.NET for your website is easy and uses very little coding.









Create Membership and Login Controls in ASP.NET


Create Membership and Login Controls in ASP.NET : Multi-thousand tips to make your life easier.


Your website might invite visitors to become members so they can get special discounts on products or view private documents. To sign up these visitors and turn them into members, your website will need membership forms to gather basic information from the visitors and enable them to enter a username and a password to log in to the website. The site will have certain pages that cannot be accessed unless you sign up and become a member. Membership and login controls can be created in ASP.NET using very little code.

  1. Creating a membership page - Select the ASP.NET configuration and click the Security tab and select the Security Setup Wizard. Follow the instructions for configuring security, then when you click Next, select the Internet option. This option will enable users on the Internet to access the membership forms and log in from the web. You have to specify now what sort of role the user will use. This is just like a designation to separate members who will only have access to certain pages and they will only be limited to viewing and not to editing portions of the page. Create a new user on the next page of the wizard; this is where you enter information like your username, password, your email, a security question and answer. The Create User button needs to be clicked. You will get a confirmation notification. The next part of the configuration defines the rules for accessing the MemberPages folders. In the Add New Access Rule Box, choose the MemberPages Folder, then click Anonymous users and click the Deny option for permission, then select Add this Rule and Finish. This will deny non-members access to the pages that are exclusive for members only.
  2. Creating the login page - In the Solution Explorer window, add a web form and name it Login.aspx by right-clicking Web Application and then choosing the Add New Item option. Drag and drop Login from the toolbar to the work area. This is the field where members enter their username and password to gain access to the site. You will now create a welcome message to greet members who log in and a message for users who are not logged in. Drag and drop the LoginView control to the page and click the little arrow button to edit the AnonymousTemplate by typing in "Click Link to Login." For the message that greets logged-in users, go to the LoginView Tasks Panel, then select the LogInTemplate. Select the edit area of LoginView, then type in "You are successfully logged in. Welcome," and then drag LoginName in the template from the toolbar after Welcome.

Membership forms and login fields provide security to your website and the data it provides its members. Creating these functions in ASP.NET for your website is easy and uses very little coding.


Create Membership and Login Controls in ASP.NET

Create Membership and Login Controls in ASP.NET : Multi-thousand tips to make your life easier.
Create Membership and Login Controls in ASP.NET
Create Membership and Login Controls in ASP.NET
Recommend to friends
  • gplus
  • pinterest

Comment

Leave comment

Rating