views:

1016

answers:

2

I'm specifying my doctype as xhtml strict, but it's being sent over the wire as a content type of text/html. I'd like to specify that the content type is application/xhtml+xm, but I can't figure out where, or if, I can configure this from within my application

+4  A: 

You can specify it in the @ page attributes section, here is an MSDN doc.

Mitchel Sellers
Can't do it from the master? Urgh.
Will
Sadly, it does not appear so.
Mitchel Sellers
I guess you could set it via Response but that might get a bet sketchy in terms of functionality
Mitchel Sellers
Yeah, Response would be the only from from the master page.
Tom
+2  A: 

In your code behind file, during the Page_Load event, try addind the following code:

Response.Clear()
Response.ContentType = "application/xhtml+xm"
Dillie-O
That's the property you want, but you'll probably want to set it sooner than load (maybe Pre_Init)
John Sheehan