Hi Clouds:
Consider setting the event handler in the ASPX markup.
For example, I can set the event handler for a DropDownList inside a
DataGrid with the following:
<asp

ataGrid id="DataGrid1" runat="server"
AutoGenerateColumns="False"
OnItemDataBound="DataGrid1_ItemDataBound">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp

ropDownList id="ItemDropDown"
OnSelectedIndexChanged="DropDown_SelectedIndexChan ged"
AutoPostBack="True" Runat="server">
</asp

ropDownList>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp

ataGrid>
I'm not sure if this meets your definition of dynamic, but if all the
lists call the same event handler method it should work fine.
HTH,
--
Scott
http://www.OdeToCode.com
On Sun, 29 Aug 2004 04:03:06 -0700, Clouds
<> wrote:
>Hi !
>How do I add the dynamic event handler for a dropdownlist present in the
>itemtemplate of a datalist !!
>I am doing it in the itemdatabound event of the datalist but it doesnt
>work... I am also setting the autopostback property to true for the dropdown
>list and it works but the handler doesnt get invoked at runtime...
>I have to do it in itemdatabound becaz whether to add the handler or not is
>driven based on the information which i have in datasource...
>
>Whats happening to the handler ??
>
>Regards