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
 Login Problem
Posted by RAJESH KUMAR VISHWAKARMA on  11/4/2009 4:25:01 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
I have created Registration Form in asp.net, through this form New User Id And Password are being created.

Now i want to open web form after matching Uid and Password from SQL Database, which is being stored in Login Table. So i need what exact code i have to write on Submit_onClick button.

Thank You
R.K.VISHWA



Post Your Reply Post New Question

 Viewer's Reply
Check User Id and Password in the Database
Answered By Moderator1 on 11/4/2009 7:33:53 AM
Hi,

1. Take the Input for User Id and Password from the Login Form.
2. Pass it to a SQL Query to check whether the User Id and Password Exists in your DB as follows

Select * from YourRegistrationTable Where User_Id=@InputUserId and Password=@InputPwd

If Row Exists, then allow the user
Otherwise, You can display "Invalid Login" Error Message.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Building a Web Application Security Program
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
Introduction to Web Applications Development