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 to check username allready exists in database using c#.net
Posted by sanjay chaudhari on  3/9/2010 7:38:19 AM Category: C#
Add to my favorites
Email to friend
how to check username allready exists in database using c#.net


when we create form registration that how to check username allready exists in database using c#.net window application............
please reply me code.......

Post Your Reply Post New Question

 Viewer's Reply
Check User Name Already Exists in Asp.Net
Answered By Moderator1 on 3/12/2010 12:39:45 AM
Hi,

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

Select * from YourRegistrationTable Where User_Id=@InputUserId

If Row Exists, then display "User Name Already Exists. Please input different User Name"
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
Simply SQL - Free 111 Page Preview!
Website Magazine