Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
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, 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

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

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
Programmers Heaven C# School Book - Free 338 Page eBook
Simply SQL - Free 111 Page Preview!