.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 14th, 2001, 06:01 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Dynamically add web control

Originally posted by : echo (echogp@hotmail.com)i 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

Reply With Quote
  #2  
Old September 25th, 2001, 12:42 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Dynamically add web control


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT