SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using HTML 5 specific markup () in my modified mobile dispform.aspx page (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MOBILE\dispform.aspx). In order for some of the browsers to correctly parse and interpret the content, I need to add the


as the first line of the response stream. How can I accomplish this?

share|improve this question
up vote 1 down vote accepted

The parent SPMobilePage has a Response property which can be used to directly inject markup into the response stream.

So in this case in my OnLoad() method is simply find the parent and then add the processing instruction markup:

   protected override void OnLoad(EventArgs e)

        SPMobilePage parent = this.Parent.Parent as SPMobilePage;
        parent.Response.Write("<!DOCTYPE HTML>");
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.