Change doctype in ASP.NET

本小妞迷上赌 提交于 2020-01-03 17:29:08

问题


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?


回答1:


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.

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




回答2:


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.



来源:https://stackoverflow.com/questions/9191861/change-doctype-in-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!