How can I add an event to a control in a templete column?

B

basulasz

I have a templete column, and a DropDownList in header templete. I want to
add a SelectedIndexChanged event to that DropDownList. But I couldn't. How
can I do that?

Thanks...
 
B

Brock Allen

Why can't you do this:

<ItemTemplate>
<asp:DropDownList ... OnSelectedIndexChange="OnChange" ...>
</ItemTemplate>

And then have in your codebehind:

protected void OnChange(object s, EventArgs e)
{
...
}
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top