cascade change other control based on dropdownlist control changes

G

Guest

Hi,

I have a dropdownlist control and a few textbox on my web form. How can I
update those textbox content when user select item from dropdownlist control?
I really want to do this on client side so that don't need back to server.
Thanks.

william
 
G

Guest

Hi William
in the property of dropDownList make AutoPostBack=true
and in the events of dropDownList.selectIndexChange write ur code
 
E

Eliyahu Goldin

William,

Basically, you just need to operate on DHTML objects corresponding to your
page elements. A ddl renders as an html <select> element and a textbox
renders as <input type="text">. You need to setup a client site javascript
onchange event handler for the dll that will get the selected text or value
and populate the textboxes.

Use Attributes["onchange"] = "onDllChange()" to setup the event.

Eliyahu
 
G

Guest

Hi Eliyahu,
Thanks.
william

Eliyahu Goldin said:
William,

Basically, you just need to operate on DHTML objects corresponding to your
page elements. A ddl renders as an html <select> element and a textbox
renders as <input type="text">. You need to setup a client site javascript
onchange event handler for the dll that will get the selected text or value
and populate the textboxes.

Use Attributes["onchange"] = "onDllChange()" to setup the event.

Eliyahu

william said:
Hi,

I have a dropdownlist control and a few textbox on my web form. How can I
update those textbox content when user select item from dropdownlist control?
I really want to do this on client side so that don't need back to server.
Thanks.

william
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top