views:

965

answers:

3

Very often when working on an ASP.NET web site, the options View Code and View Designer will be missing from the content menu in the code window, as well as missing from the View menu. They are only available in the context menu in Solution Explorer.

This happens when debugging and when not debugging. Anyone know what could be causing this?

A: 

Not sure why, but try using F7 and Shift-F7 to switch between the code and the designer.

harriyott
That works, but I can never remember the keys. Maybe I should write them on a stick-it ;-) It just bothers me that they're transient in the menus.
ProfK
+1  A: 

They threaded lots of stuff in VS2008 to try to improve the user experience. One of the things they threaded was the environment "deciding" that your ASPX file has a code-behind, or vice versa. I believe the thread has a low priority, or even waits for computer idle.

I think that's the gist of it. When you encounter this, don't do anything with your computer for a quick couple seconds, then right-click again and the option should be in the menu at that point. It's just that quick pause that makes VS think it can steal some "idle" time or whatever. I was very aggravated by this a few weeks ago when I got a new computer at work and was getting this with every file I opened. I googled it a bit and came up with the above. Hasn't really been an issue lately, not sure why.

sliderhouserules
A: 

I encountered this same problem with you,and sovled by installing the Hotfix.Hotfix is available here http://blogs.msdn.com/webdevtools/archive/2008/02/09/downloadable-hotfix-performance-and-editor-fixes-for-microsoft-visual-studio-2008-and-visual-web-developer-express-2008.aspx

Glacier Zheng