我经常使用 Shift + F7在源视图和设计视图之间切换。
有人知道在 源文件和它的 文件后面的代码之间切换的热键吗,例如(Default.aspx 和 Default.aspx.cs) ?
Just drop the shift key, it's just F7.
F7
Yep just F7
Look at this poster for C# VS2008 shortcuts
You can also bind it to any combination of keys you like, go to tools, options (show all settings) environment, keybord, Show Commands for View.ViewCode and change to your liking.
Added by Rob Cooper:
For 2005 Users: Visual C# 2005 Keyboard Shortcut Reference Poster
For 2010 Users: Visual C# 2010 Keyboard Shortcut Reference Poster
Edit 08 Sept 2014
There don't seem to be posters beyond 2010 but there is a website for VS2012, VS2013 and VS14: Visual Studio Shortcuts
Try Ctrl + PageUp to toggle between design view and code behind.
When in code view use shift-F7 to get to the designer. When in the designer use F7 to get back to code.
In case F7 does not work for you, go to "Tools - Import and Export settings - Reset all settings" and choose "Web development" template to reset to.
In the VS2010 the following works:
Go to: Tools > Options > Keyboard
>
Search for "View.ToggleDesigner" in "Show Commands Containing".
Add new shortcut to "Global" with F7.
For those trying to do this (switch from the code view to markup view) in VS2012, I had to go Tools > Options > Keyboard, then select
Tools > Options > Keyboard
This results in F7 switching both ways from the markup view to the code view and vice versa.
Before doing this I had to use Shift+F7 twice to get to markup from the code view.
In VS 2013 it is
Tools > Options > Environment > Keyboard
Type "View.Toggle" or "View.ToggleDesigner" (the command could be either depending on the version of VS) in Show Commands Containing:
Show Commands Containing:
Make Sure Use new shortcut in: is set to Global
Use new shortcut in:
Global
Put cursor in Press shortcut keys: box
Press shortcut keys:
Hit F7 then the Assign button
Assign