Adding EventHandlers To DataListItem Child Controls

M

Mathew Quick

For the sake of example I am keeping this simple:
I have a DataList.
The DataList has one DataListItem. (i.e. one row)
The DataListItem has a DropDownList control.

I want to set up a SelectedIndexChanged event handler on the
DropDownList control.

I have tested out my code about every which way I can think of and I
can't get it to work. It's a pretty simple set up if you want to play
around with it so I wont bother posting the code.

Anyone have ideas?

-Quick
 
J

John Saunders

Mathew Quick said:
For the sake of example I am keeping this simple:
I have a DataList.
The DataList has one DataListItem. (i.e. one row)
The DataListItem has a DropDownList control.

I want to set up a SelectedIndexChanged event handler on the
DropDownList control.

I have tested out my code about every which way I can think of and I
can't get it to work. It's a pretty simple set up if you want to play
around with it so I wont bother posting the code.

Anyone have ideas?

Use FindControl to find the DropDownList.
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top