Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Check "User ID" already exist or not when user move from "UserID" Text box!

Check "User ID" already exist or not when user move from "UserID" Text box!

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabase
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sr Frank
    wrote on last edited by
    #1

    Hi, I am working on a simple user registration form in ASP.NET using C#. I created a check for “UserID”, when user will click “Submit” button then my logic will check into database for UserID “Already Exist in database or not” I tried this same login on “User ID” Textbox (textchange event), but it is not working , please let me know where to write this code for TextBox . THanks

    H 1 Reply Last reply
    0
    • S Sr Frank

      Hi, I am working on a simple user registration form in ASP.NET using C#. I created a check for “UserID”, when user will click “Submit” button then my logic will check into database for UserID “Already Exist in database or not” I tried this same login on “User ID” Textbox (textchange event), but it is not working , please let me know where to write this code for TextBox . THanks

      H Offline
      H Offline
      HardikSitapara
      wrote on last edited by
      #2

      Hiiii Sr...Frank Here is an Explanation for your problem. Here is ur ui how it looks like. FirstName : Text-Box
      LastName : Text-Box
      UserID : Text-Box
      Email ID : Text-Box
      Password : Text-Box
      now whenever u press the button Submit take all the values of the textboxes and pass it as ur input parameters to ur stored procedure and write down the following query in ur Stored Procedure. If Exist(select UserID from Users where UserID = @UserID) BEGIN SET @ErrorNo = 101 SET @ErrorMsg = "User ID already Exists" return ; END Note : Here @ErrorNo and @ErrorMsg are local variables created in Stored Procedure.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups