简体   繁体   中英

Where in Visual Studio 2012 did Page Controls and Events goto for codebehind?

I can't for the life of me figure out how to do something that I did forever in VS2008 and earlier with VS 2012.

When creating a web application, throw some server side controls on the page, then goto the codebehind and at the top of the code editor were 2 dropdowns. The one on the left displayed the page and controls on the page, selecting one of them say a GridView, would then display the Events for that control in the right side dropdown. So I could double click on it and create one of the events without remembering and typing the event in code.

In my VS 2012, the left only displays the Page (big help) and no controls. With that selected, the right dropdown displays controls, but selecting it only loads up the designer for that page and the entry for that control.

Is it a setting I don't have set, or how and why is this changed, how can do this again in VS2012?

它在属性窗口中,但是您必须单击闪电图标。

You can re-enable the events navigation bar at the top of code behind files like this:

1) From the Tools menu select Options

2) From the options on the left select All Languages

3) From the options on the right, click the checkbox next to Navigation Bar then check it again.

It is important to switch it off then back on again.

This will override your development environment settings and will force the Event Navigation Bar to appear at the top of all text editors.

双击Design vew中的控件(按钮)以为其Click事件创建处理程序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM