When you create web pages in Visual Studio 2008, they are by default XHTML 1.0 Transitional. Sometimes developer want more control over the DocType or they want their pages to be XHTML 1.0 compliance. So you can also change the DocType or if you are using master pages then changing DocType is very easy just change the DocType in master page and all the child pages that use the master page will automatically acquire the DocType.
It is also possible to change the Visual Studio default page template also. To do this you first need to change the visual studio default page template and then build the visual studio template cache.
- First you need to modify the visual studio template file. You can find the visual studio template file path “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\WebForm.zip”.
- Unzip the webform.zip and modify these two file “WebForm.aspx and WebForm_cb.aspx”.
- Simply change the DocType.
- After updating the visual studio template files, delete the c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache folder to clear out the template cache.
- Run Visual Studio using the following command line to rebuild the template cache:
devenv /InstallVSTemplates