Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting all possible events for a control in C#
Message
 
 
To
03/03/2009 16:31:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01385323
Message ID:
01385353
Views:
40
>>>In the code window in VB I was able to use the left handed drop down to view all the controls on my form, and the right handed drop down to select an event for that control. This would create a method signature. Why doesn't C# do this? Is there an alternative?
>>
>>Select the control, go to Properties window, Methods, double click on the method there (from memory).
>
>Yes, that was it. To make it more clear for anybody in the future, there is an Events button in the toolbar of the Properties window.

Right, the thunderbolt. One of the things I like about the way VS works is that when you click an event in the Properties events list, a dropdown lets you choose any handler method that has a matching signature. So if there are multiple controls that need the same action on a particular event, you only need to write one method for all of them. Not that you can't achieve the same result with other tools, it's just pleasing the way it's implemented in VS.
Previous
Reply
Map
View

Click here to load this message in the networking platform