Dynamic form - drop down list

jeffpeters

Member
Joined
Jul 28, 2006
Messages
14
Programming Experience
5-10
Hi

I am building a dynamic form with drop down lists generated from the database.

I want to add others if the value of the ddl is a chosen one.

Any idea how I can recognise which drop down list was changed (assuming a few) if I change the autopostback property to true.

I could use the page.ispostback boolean and the sender object but how?

or is there something else???

Thanks

jeff
 
While you are creating the dropdownlists, use AddHandler to wire up an event handler to the dropdownlist's SelectedIndexChanged event. The event handler will have a parameter (usually named sender) with object type which you can cast to a dropdownlist type; then you have a reference to the dropdownlist that caused the event.
 
Back
Top