Check "User ID" already exist or not when user move from "UserID" Text box!
-
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
-
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
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.