Saul Dolgin
Saul Dolgin

Reputation: 8814

Is it possible to suppress the Web Forms Designer in Visual Studio from being opened?

The primary reason for asking how to do this is because I personally never use it. The Designer is slow to load... especially on complex pages with lots of controls. To put it bluntly, I think of it as a crutch that web developers should avoid.

I would like to encourage team members to avoid using it as well. If there is a way to do this through a policy setting (either in TFS or otherwise) or some options when installing Visual Studio that would be even better.

Upvotes: 2

Views: 302

Answers (5)

blu
blu

Reputation: 13185

Go to

Tools Menu 
  -> Options 
    -> HTML Designer

The first groupbox is "Start pages in". Setting it to Source View should accomplish what you are looking for within VS.

Upvotes: 2

Saul Dolgin
Saul Dolgin

Reputation: 8814

Thank you for all the helpful answers. What I ended up doing was setting the default view from Tools -> Options -> HTML Designer - Start Pages In = Source View (as suggested by @blu). Then I exported my Visual Studio settings to a file. The snippet below is an abstract of the relevant section. This can be saved as a .vssetings file and imported by team members as part of our standard setup:

<UserSettings>
    <ApplicationIdentity version="9.0"/>
    <ToolsOptions>
        <ToolsOptionsCategory name="TextEditor" RegisteredName="TextEditor">
            <ToolsOptionsSubCategory name="HTML Specific" RegisteredName="HTML Specific" PackageName="Visual Studio HTM Editor Package">
                <PropertyValue name="StartPageView">1</PropertyValue>
            </ToolsOptionsSubCategory>
        </ToolsOptionsCategory>
    </ToolsOptions>
</UserSettings>

Upvotes: 1

Rob Windsor
Rob Windsor

Reputation: 6859

I think so. In the Solution Explorer, right-click the an aspx or ascx file and choose Open With. When you choose the editor you want you can set it as default.

Upvotes: 0

BinaryMisfit
BinaryMisfit

Reputation: 30589

There is no way to suppress the Editor directly, as it is part of Visual Studio. The Visual Studio 2008 is a much improved editor, as it is the same one used in Expression Web and I often use it. Also the source view is part of the Editor from what I remember.

There is an option in VS Settings to always open ASPX pages in Source View however:

  • Tools
  • Options
  • Web Browser
  • View source in

You can also specify an external editor. There is no way to suppress the designer using TFS or a GPO however.

Upvotes: 0

Brad Wilson
Brad Wilson

Reputation: 70746

It's a per-user setting, by right clicking on the .CS file for the form and saying "Open With...", then changing the default editor for that type.

AFAIK, there is no way to force that setting via TFS.

Upvotes: 0

Related Questions