Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET4
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 7-Mar-13 19:01pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You can check the username availability with ajax.
Check here Username availability check with ajax[^]
  Permalink  
Comments
pradiprenushe at 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?
aspnet_regiis -i at 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 at 8-Mar-13 4:16am
   
Thanks for answer.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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");
}
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 8 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100