
September 25th, 2001, 12:42 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Originally posted by : Louis-Philippe Alain (lpalain@wizh-humanz.com)Hello Echo,Just add one event handler function respecting the Click Event Delegate of the dropdownlists. Each time you create a new dropdownlist, subscribe the function you created to the 'Click' event.The important part is that : the first parameter of every event hanler is the Sender object.This means that you will have access to any public property of the dropdownlist that has been clicked. All you have to do is to cast the generic 'object' sender to a dropdownlist object ( (DropDownlist)sender ).I suggest you add a meaningful name to your dropdownlists when you create them and read back this name in your click handler. This way, you will be able to differenciate between the different Dropdown List boxes on your page.Let me know if this helped!Louis-PhilippeP.S. I'm looking for a job in C#. I'm willing to work as a freelancer over the Internet.Email: lpalain@wizh-humanz.com ------------echo at 8/14/2001 4:01:57 PMi have a webpage need dynamically adding DropdownList, now i can add them, but how can i create the event handler(the 'SelectedIndexChanged' event) for each DropdownList? Anyone give me a help? your help will be greate appreciated.Thanksecho
|