Link to home
Start Free TrialLog in
Avatar of SamJolly
SamJollyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to add an event handler to a dynamic control ie DropDownList...?

Hi,

I am adding controls to table cells dynamically using Controls.Add(myTextbox) etc. However I cannot see how I can define which "SelectedIndexChanged" event handlier should be triggered. Also the ID is not known so one cannot add it to the "Handles" bit of an event handler. If one was doing this in an ASPX then one would use something like:

OnSelectedIndexChanged="_DDLB_SelectedIndexChanged"

I can define "Autopostback = True" in code however.

Appreciate any help.

Thanks,

Sam
ASKER CERTIFIED SOLUTION
Avatar of SamJolly
SamJolly
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial