views:

140

answers:

2

I recently switched over to C# from vb.NET and within visual studio found that hooking up events is extremely annoying. In VB I could select a control from a drop down on the top left and the event on the top right drop down and the method would automatically be created and attached to the control using "handles". I know that is not supported in C# but it seems I have to go through each control and add the events manually on the page and the codebehind. Is there an easier/faster way to do this like in VB or is it just how it is? Thanks!

+11  A: 
Donut
Nice! Thanks, that will save me a lot of time!
Mike
And if you double-click in the field where you would type in the handler name, Visual Studio assigns a default value.
Vinay Sajip
Thanks Vinay, edited answer for completeness.
Donut
+3  A: 
Qua
I always forget this one, and its one of the best shortcuts.
ck