views:

57

answers:

2

The F7 key in Visual Studio - it allows the user to switch between the code for a designer element (e.g. a Windows Form or a Web User Control).

This works great in Windows forms: when I'm in the .cs file for a visual element (e.g. a User Control), it shows me the visual designer.

It doesn't work so great for me in ASP.NET: When I'm in the markup (e.g. the Source view of the Designer), it takes me to the CodeBehind, which is exactly what I want. However, once in the CodeBehind, it takes me back to the Design view on the Designer, which is never what I want.

How do I make Visual Studio always show the Source view instead of the Design view when hitting F7 from a codebehind page?

A: 

I don't work in ASP.NET but there is a setting under options -> HTML Designer to start pages in Source view, Design view or split view. Might want to try that.

nportelli
It looks like what you've described is the default option, so that's not going to work. It makes the Source view appear if you double-click the file, but I don't know why the behavior is not consistent for F7.
Josh Kodroff
A: 

It can't be done.

Josh Kodroff
For completeness sake, I'm leaving this as the answer unless someone can show me otherwise.
Josh Kodroff