1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

check whether ID already exist in database

Discussion in 'C#' started by qq2, Apr 1, 2009.

  1. #1
    hi, i need help with my project. hope anyone can help me.

    it's a register page. the user key in details. once the ID text box lost focus, the site will auto check to mysql whether the id already exist. if yes then error message.

    i can do it only when user submit the form, then just checking the ID from database. please help me find a way once the ID text box lost focus, then auto checking. thanks a lot
     
    qq2, Apr 1, 2009 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You will need to use AJAX. e.g:
    when the textbox loses focus (i think it is the onBlur event), you would run a javascript that will load an XML file, lets say (check.asp).. check.asp will return an XML response either stating that the id is in use or not in use... you would then act on this response.
     
    camjohnson95, Apr 1, 2009 IP
  3. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #3
    buldozerceto, Apr 1, 2009 IP
  4. zinist

    zinist Banned

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    43
    #4
    If you are using web application then set the autopostback = true property of idtextbox and write sql query to check with database
     
    zinist, Jun 27, 2015 IP