Click here to Skip to main content
15,888,220 members
Please Sign up or sign in to vote.
1.12/5 (3 votes)
Hi,
I m new to mvc.
I have two textboxes like follows-
Email:
HTML
<input type="text" id="txt_email" />

Username:
HTML
<input type="text" id="txt_username" />


I want while writing email in txt_email,user name should display in txt_username according to sql database.
Posted
Updated 21-Jul-14 19:14pm
v2
Comments
SRS(The Coder) 22-Jul-14 1:16am    
you can try making ajax call to get the username by email id on blur of the email text box and set to the username textbox.
Maciej Los 22-Jul-14 1:40am    
What have you done till now? Where are you stuck?

1 solution

Use jQuery auto complete functionality. onChange of text box you can use this, and do call a jQuery post event and pass your textbox value as parameter and get the result as in below example in available tags they are hard coding the values
Here is the link
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900