views:

80

answers:

2

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.

A: 

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.

M4N
+3  A: 
Donut
There are times when I can't seem to get that Events button to show up. Sometimes clicking outside the control and then back in again fixes it for me. Sometimes it doesn't.
StriplingWarrior
I thought he was talking about some dropdrop with event handlers for the page and it stubs the handler for you. The one you mentioned is available from the designer and it's available for both C# and VB. He said it shows up when writing inline code.
Tony_Henrich
@Tony_Henrich - See the second part of my response; is that what he's talking about? Typing the name of the control, then typing "." + [the name of the event] + "+=", then pressing `Tab` twice?
Donut
Maybe. If he said Intellisense, it would have cleared this.
Tony_Henrich
I am going to accept this answer even though I think the article is not about the events dropdown in design mode. he mentioned code.
Tony_Henrich