Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a textbox which is filled from database
and dropdown list which is also filled from database.
So now i want, when i select a element in dropdown list the textfield fill against that element
the textbox which i fill from database through a [webmethod].as it possible
Posted
Updated 11-Jun-14 21:28pm
v2
Comments
Fadi Halboni 12-Jun-14 3:33am    
Dear,

number of controls (textbox or dropdownlist) fixed or generate from database.

can you view the example to help you.

1 solution

Just use onchange Event for DropDownList and call a JavaScript method on that Event. Use jQuery Ajax and call a WebMethod.

Inside the WebMethod, connect to Database and fetch necessary data and return to the jQuery Ajax call. Then assign that return data inside the success block of Ajax call.
 
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