문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top