Visual Studio HTML 设计器在哪里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31654960/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 11:50:46  来源:igfitidea点击:

Where is the visual studio HTML Designer?

htmlvisual-studioide

提问by Sweeper

Where is the Visual Studio HTML Designer? I see that there are options for the HTML Designer but I can't open it. There is a HTML Designer options node!

Visual Studio HTML 设计器在哪里?我看到 HTML 设计器有一些选项,但我无法打开它。 有一个 HTML 设计器选项节点!

So I just want to ask why I can't find the designer and how do I open it. When I create an HTML file it just goes to the HTML code.

所以我只想问为什么找不到设计师,怎么打开。当我创建一个 HTML 文件时,它只会转到 HTML 代码。

回答by DividedByZero

The default HTML editor (for static HTML) doesn't have a design view. To set the default editor to the Web forms editor which does have a design view,

默认的 HTML 编辑器(用于静态 HTML)没有设计视图。要将默认编辑器设置为具有设计视图的 Web 表单编辑器,

  1. Right click any HTML file in the Solution Explorer in Visual Studio and click on Open with
  2. Select the HTML (web forms) editor
  3. Click on Set as default
  4. Click on the OKbutton
  1. 右键单击 Visual Studio 中解决方案资源管理器中的任何 HTML 文件,然后单击 Open with
  2. 选择 HTML (web forms) editor
  3. 点击 Set as default
  4. 点击OK按钮

Once you have done that, all you need to do is click on designor splitview as shown below:

完成后,您需要做的就是单击designsplit查看,如下所示:

Screenshot showing the location of said options

屏幕截图显示了所述选项的位置

回答by cflyer

Another way of setting the default to the HTML web forms editor is:

将默认值设置为 HTML Web 表单编辑器的另一种方法是:

  1. At the top menu in Visual Studio go to File> New> File
  2. Select HTML Page
  3. In the lower right corner of the New File dialog on the Openbutton there is a down arrow
  4. Click it and you should see an option Open With
  5. Select HTML (Web Forms) Editor
  6. Click Set as Default
  7. Press OK
  1. 在Visual Studio中的顶部菜单去File> New>File
  2. 选择 HTML Page
  3. Open按钮上的“新建文件”对话框的右下角有一个向下箭头
  4. 单击它,您应该会看到一个选项 Open With
  5. 选择 HTML (Web Forms) Editor
  6. 点击 Set as Default
  7. OK

Screenshot showing how to get to the "Open With" dialog box when creating a new file.

Screenshot showing how to get to the "Open With" dialog box when creating a new file.

回答by cflyer

Go to [Tools, Options], section "Web Forms Designer" and enable the option "Enable Web Forms Designer". That should give you the Design and Split option again.

转到[工具,选项],“Web 窗体设计器”部分并启用选项“启用 Web 窗体设计器”。这应该再次为您提供设计和拆分选项。

回答by TimSmith-Aardwolf

The solution of creating a new HTML file with HTML (Web Forms) Designer worked for that file but not for other, individual HTML files that I wanted to edit.

使用 HTML (Web Forms) Designer 创建新 HTML 文件的解决方案适用于该文件,但不适用于我想要编辑的其他单个 HTML 文件。

I did find the Open With option in the Open File dialogue and was able to select the HTML (Web Forms) Editor there. Having clicked the "Set as Default" option in that window, VS then remembered to use that editor when I opened other HTML files.

我确实在打开文件对话框中找到了打开方式选项,并且能够在那里选择 HTML(Web 表单)编辑器。单击该窗口中的“设置为默认值”选项后,VS 会在我打开其他 HTML 文件时想起使用该编辑器。