简体   繁体   English

如何使VS2008在智能感知产品周围加双引号

[英]How do I make VS2008 place double quotes around intellisense offerings

I am in the HTML editor (building an ASP.NET MVC view) and coding up HTML. 我在HTML编辑器(构建ASP.NET MVC视图)中并对HTML进行编码。

The editor is handy with intellisense for various attributes, but when I select whatever VS2008 offers, it never places double quotes around them, as HTML says you should. 该编辑器对各种属性具有智能感知,非常方便,但是当我选择VS2008提供的任何内容时,它都不会像HTML所示那样在它们两边加上双引号。

For instance: 例如:

<head runat=

offers server , but when I select it, I get: 提供server ,但是当我选择它时,我得到:

<head runat=server

instead of 代替

<head runat="server"

Is this a setting somewhere? 这是某个地方的设置吗?

Not a setting, but if you start with a single quote, it will close it for you. 不是设置,但是如果您以单引号开头,它将为您关闭。

In HTML, you don't have to quote attributes. 在HTML中,你不必引用属性。

In XHTML, you do. 在XHTML中,您可以这样做。

Regardless, in the options you can set this: 无论如何,您可以在选项中进行以下设置:

Tools -> Options -> Text Editor -> HTML -> Format -> Insert attribute value quotes when typing 工具->选项->文本编辑器-> HTML->格式->键入时插入属性值引号

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM