Print this page
Tuesday, 05 March 2013 13:55

how to use membership provider for login

Written by 
Rate this item
(0 votes)

using membership Probvider you can easily
make a user login using username and password and redirect to
default or any page by the following way -

//UserName and Password textboxes takes user name and pass inputs

if (Membership.ValidateUser(UserName.Text.Trim() , Password.Text.Trim()))

FormsAuthentication.RedirectFromLoginPage(UserName.Text.Trim(), false);

Response.Write("Input correct User Name and Password!");

the above codes first validate a user with user name and password then

redirects the user to Projects.aspx page by logging in the user.

Read 2563 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.
Login to post comments