[RESOLVED]Bind values from database to textbox using jquery

I have a list of values in database.. while user types values in that text box i have to validate values . if the value already exists say already there else accepts the data. i dnt want to validate on form submission i want to validate on user input itself.. 

please help me

1. Assign AutoPostBack=true to the textbox

2. Use TextBox_TextChanged event

Hi Ashwin,

Steps:

1. Develop one ActionResult with Json return type and write code to get data list from database and return the same.

2. In View write jQuery keypress event handler and inside that write jQuery Ajax code to request list of record from json Method.

3. Finally iterate through each data from json array and validate input with that, if found populate error message and return false;

Thanks,

Avishek

If it helps you, pls mark as Answer.

Leave a Reply