Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow