如何让 VS2008 在智能感知产品周围放置双引号

发布于 2024-08-18 22:53:44 字数 354 浏览 7 评论 0原文

我在 HTML 编辑器中(构建 ASP.NET MVC 视图)并编写 HTML 代码。

该编辑器可以方便地对各种属性进行智能感知,但是当我选择 VS2008 提供的任何内容时,它永远不会像 HTML 所说的那样在它们周围放置双引号。

例如:

<head runat=

提供服务器,但是当我选择它时,我得到:

<head runat=server

而不是

<head runat="server"

这是在某处设置吗?

I am in the HTML editor (building an ASP.NET MVC view) and coding up 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.

For instance:

<head runat=

offers server, but when I select it, I get:

<head runat=server

instead of

<head runat="server"

Is this a setting somewhere?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉宸 2024-08-25 22:53:44

不是一个设置,但如果您以单引号开头,它会为您关闭它。

在 HTML 中,您不必引用属性。

在 XHTML 中,您可以这样做。

无论如何,在选项中您可以这样设置:

工具 ->选项->文本编辑器 -> HTML->格式->键入时插入属性值引号

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.

In XHTML, you do.

Regardless, in the options you can set this:

Tools -> Options -> Text Editor -> HTML -> Format -> Insert attribute value quotes when typing

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文