Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

beginner question

Is there any where to change the default doctype declaration for a webform in VS.NET?

It always seems to default to HTML 4.0 transitional, whereas, I want to use XHTML 1.0 transitional.

Currently, I just type over the existing <!DOCTYPE>.

Charles Reich
Thursday, February 27, 2003

Have a look in:
Program Files\ Microsoft Visual Studio .NET\ VC# \VC#Wizards\ CSharpAddWebFormWiz\ Templates\ 1033

Edit WebForm1.aspx to your requirements.

Duncan Smart
Friday, February 28, 2003

Thanks again Duncan!

Charles Reich
Monday, March 3, 2003

FYI, XHTML in ASP.NET is a PITA.  Have fun!

Richard Ponton
Monday, March 10, 2003

Well, XHTML is a bogus hack, so it shouldn't be used, but that's another story altogether. :)

I've found XHTML is fine w/ ASP.NET. All the Microsoft controls seem to emit XHTML-compliant definitions when you force the use of the HTML 4.0 HtmlTextWriter.

Brad (
Tuesday, March 11, 2003

*  Recent Topics

*  Fog Creek Home