Click here to Skip to main content
15,878,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

in my registration for when new user select username in textbox , it should return whether user name exists or not. i want that functionality. how can i do?
Posted

You can check the username availability with ajax.
Check here Username availability check with ajax[^]
 
Share this answer
 
Comments
pradiprenushe 8-Mar-13 2:21am    
Very good solution.
I have one doubt, we can do this by using update panel, web service or page method. Which method you prefer as best & why?
bbirajdar 8-Mar-13 4:02am    
UpdatePanel is the best way. Since it does not use javascript. So less client side code and less browser compatibility issues
pradiprenushe 8-Mar-13 4:16am    
Thanks for answer.
Create on local web service. Create on web method in to user is present or not. Call this web method in textbox onblur event.
This will check username exist or not asynchronusly & also your ui will not be blocked.
Refere this link
http://www.semenoff.dk/en/Code-Corner/ASP.Net.AJAX/WebService-From-JavaScript.aspx

You can also use page method for this purpose
Refere this
http://www.dotnetcurry.com/ShowArticle.aspx?ID=109
 
Share this answer
 
v2
if you save the user details in database
then check or write a query that compare text box value into database..
if it exists then show the message to user...

ex: select username from registration where name="textbox1.Text"
check condition like
if(username==textbox1.text)
{
messagebox.show("alredy exists");
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900