Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi codeproject
i have a form with three textboxes which are name, age and salary, now i want that when a user enter his name, on the name textbox his age and salary should be retreived from the database to their respective textboxes. Thanks in advance
Posted
Comments
[no name] 2-Oct-12 4:45am    
Ur question is not completed???Tel me what you have tried and explain that???It willbe very useful for us to answer...

1 solution

you have to search data from database with where query
example : select * from tblname where name like '"+ textbox.text+"'

get this data in datatable

assign this data into txtage.text=dt.rows[0]["age"].tostring();
this alll should be on on textchanged event of name textbox.

You can also do this by javascript.

post textbox value of name to the web service and get data from there. and fill into your textbox like above
return string from webservice and split them as salary and age in ajax post
 
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