Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:47:30+00:00 2026-06-09T23:47:30+00:00

I want validate if username already exists while user insert the username in textbox

  • 0

I want validate if username already exists while user insert the username in textbox or just after the textbox lost focus.

Jquery or Ajax?
Please, someone have examples of that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:47:32+00:00Added an answer on June 9, 2026 at 11:47 pm

    In the onblur event of the text box, get the value of textbox and using jQuery ajax, make a call to a server page where you check it and return appropriate results. based on the results show the message to user (Available or Not Available)

    Include jQuery in your page and have this script also

    $(function(){
      $("#txtUserName").blur(function() {
         var userName=$(this).val();
         if(userName!="")
         {
           $.get("checkusername.aspx?username="+userName+"&t="+$.now(),function(data){
               if(data=="1")
               {
                 $("#msgDiv").html("Not Available");             
               } 
               else
               {
                 $("#msgDiv").html("Available :) ");
               } 
    
           });    
         }    
      });   
    
    });
    

    Assumuing checkusername.aspx page will read the querystring value and check in the database and return(Response.Write()) “1” or “0”

    I prefer to use a Generic handler (.ASHX file) to do the server side checking instead of using the aspx file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using following rules to validate the username using jQuery validation method. I want
I want to validate my email address through jquery unobtrusive validation . Like to
I want to know how can I validate using Javascript that if user has
I have created asp.net WebService. I want to update user's info after validating him
I am using Jquery Validation . Currently, I have a username, what i want
i am trying to login and want to validate username and password against the
I want to validate a set of credentials against the domain controller. e.g.: Username:
I want to develop a functionality in an iPhone app to validate username and
Actually I want to validate username nd password only for my os1 == 2
i want to validate textbox to check if the value entered is english and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.