AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 How can I use Login control in asp.net
Posted by Md. Shohel Rana on  11/7/2009 12:50:31 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
How can I use login control in asp.net,
simply says that use login control in asp.net can be access sql server with c# code,
Please code datails me.

Post Your Reply Post New Question

 Viewer's Reply
Using Login control in asp.net
Answered By Moderator1 on 11/8/2009 7:05:49 AM
Hi,

I will you logic to create the use Login Control in the Asp.Net pages. Its very simple, and I hope you maintain the login information in the database.

So, Drag and Drop Login control into the aspx page, control name will be "Login1", in its Login1_Authenticate Method, write the code to check whether the UserName and Password match with the value stored in the database. If UserName and Password Exists, then set the Authenticated property of the login control as true.

You can get the UserName as Login1.UserName, password as Login1.Password and if it matches with the value in the database, then set the

Login1.Authenticated=true;

Then you can redirected it to other page.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!
Sexy Web Design - Free 71 Page Preview!
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview