DropDownList selecteditem, then make some changes in textbox.

C

Christina

Hello everyone,
Am having trouble solving a problem of DropDownList.

I have 2 dropdownlists say 'ddlA' and 'ddlB', and a text box.

Based on the selection in ddlA, I have to display some data in the
textbox. And on selection in ddlB, the data has to change in the same
textbox.

The problem is:
Am not able to capture the event which is getting fired on selection of
item from the dropdownlist. I tried using :

ddlA_SelectedIndexChanged().. but its not getting fired.

Ne suggestions ???

Thanks..
 
S

sam

Make sure that the viewstate is enabled for the dropdown and that you
are databinding it on *every* page load.

Also, selecting the first item in the list can sometimes not fire the
event for another reason.
 
C

Christina

Thanx Sam,
--The viewstate is enabled
--By databinding on 'every' page load, do u mean, I have to write the
DDLA.DataBind() in page_load ? I tried that, but still couldnt solve
the problem.

Ne other suggestions ??

Thnx.
 
S

sam

Did you put them in a form tag? Also make sure you bind them in page
load or page init.

Can you post some code?
 
P

Patrick.O.Ige

In your ASPX page do you have AutoPostBack="True" in your DropDownList?
Hope that helps
Patrick
 

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,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top