Tony_Henrich
Tony_Henrich

Reputation: 44115

Where's the dropdown list of events in Visual C#?

This article mentions the availability of a dropdown of default event handlers in Visual Studio (C#). I can't find it. What is in-line code? I am assuming C# code inside the aspx file? I tried that and there was no dropdown.

Read the line just below the first grey box. I am using VS 2008 SP1.

Upvotes: 1

Views: 3800

Answers (4)

Donut
Donut

Reputation: 112825

Are you talking about this panel? This lists all the events for a given control when in the Designer. You can access it by clicking the "Events" button in the Properties panel (see 1). Double-clicking in the field (2) causes Visual Studio to automatically generate a method stub.

alt text

Alternatively, if you're viewing the code, you can type the name of the control followed by "." to activate Intellisense, select the event you want to handle, then type "+=" and press Tab twice to achieve the same effect.

Upvotes: 3

Saeb Amini
Saeb Amini

Reputation: 24410

This and the feature to generate event handlers without having to switch to Design view is finally coming in Visual Studio 2012.

Upvotes: 0

M4N
M4N

Reputation: 96571

To see the dropdown list with the event's you have to switch to the design view, then open the properties pane. There you will find a toolbar button (a yellow flash), that will display the events of the selected control. By double-clicking an entry, an event-handler is added to the code-behind.

Upvotes: 0

Related Questions