starcorn
starcorn

Reputation: 8551

Change doctype in ASP.NET

I have tried to change the doctype from XHTML 1.0 to HTML5 doctype, by changing the doctype line in Site.Master.cs. However after the change HTML5 tags is still not recognized in Visual Studio 2010. Is there something more that I have to do to make it work?

Upvotes: 4

Views: 6544

Answers (2)

Darin Peterson
Darin Peterson

Reputation: 1282

Here is an alternative solution that will work regardless of which type of page you're viewing:

Tools --> Options... --> Text Editor --> HTML --> Validation

Select the "Target:" from the dropdown that you'd like to use for validation.

Upvotes: 2

benni_mac_b
benni_mac_b

Reputation: 8877

Right click on the tool bar at the top and enable the 'HTML Source Editing' tool bar.

You should then be able to select the target schema for validation from the drop down.

enter image description here

NOTE: Ensure you are viewing the aspx page, the drop down is greyed out otherwsie

Upvotes: 9

Related Questions