Home
About
Contact
Login
Home
Code and Articles
Videos
Books
Search
Demos
Portfolio
Home
>
Categories
>
Code from a Category
Asp.net C# / VB (187)
PHP (86)
MSSQL (56)
CSS (8)
Zoho CRM (47)
Zoho Invoice (1)
jQuery (16)
DotNetNuke (2)
VB.Net (66)
Zoho Creator (5)
Zoho Mail (2)
Other (7)
Zoho Support (1)
Salesforce CRM (3)
SugarCRM (1)
How to Check The Username Availability Using ASP.Net Ajax
User Name:
codelecturer
Name:
Mike Chauhan
Contact Me:
www.datawebcoder.com/ContactUs.aspx
Home Page:
www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD...
[More]
Viewed Times:
300
Add Date:
11/09/2011
Here I will explain how to check the username availability using asp.net Ajax .
I have designed one registration page in that user will enter user details like username, password etc at the time of enter username in textbox I need to validate the username whether that username available or already taken by any other user for that I am checking username availability in database based on username.
Here I am getting one problem that is after enter username in textbox I am getting the data from database and showing the result on page like whether that username available or not but at that time page gets postback and losing the entered values in textboxes for that reason I used ajax concept to check username availability.
Now we can see how to check username availability in our application without postback for that First add AjaxControlToolkit reference to yourapplication and add
To your aspx page and design your page likes this
If you observe above code I placed textbox in update panel to allow only partial postback based on that we can avoid the complete postaback of page during getting the data from database and I set property AutoPostBack="true" And used ontextchanged="txtUsername_TextChanged" event to display result after enter the text in textbox.
Now add using System.Data.SqlClient; reference in codebehind and write the following code to get the username from database
Reply above Post
Related Posts
ASP.NET-How to Show The Second Level Of Menu Items
How to Keep a check on your IDENTITY columns in SQL Server
How do you know how many times have downloaded your file
Is CRM cost creep the fault of the vendor or the customer's poor definition of scope?
How to Encrypt the Password and Store it in the Database
Post a Comment
Name:
(Optional)
Email:
(Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Yes
No
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.