Change DocType dynamically

I have a single page(created before Master pages were available) that loaded dynamically one or another user control.Some child controls have css for quirk mode, but for new controls I want to use latest DocType
<!DOCTYPE html>
The solution is to set it dynamically in code-behind depending on current control to load(the code is copied from http://stackoverflow.com/questions/174916/how-do-you-specify-your-content-type-in-asp-net/6932768#6932768)

=========aspx===============
<%@ Page Language=“C#” AutoEventWireup=“true” CodeFile=“Default.aspx.cs”
Inherits=“_Default” %>

<asp:literal runat=“server” id=“DocType”></asp:literal>

<html xmlns=“http://www.w3.org/1999/xhtml”>
<head runat=“server”>
==============code behind=========
protected void Page_Load(object sender, EventArgs e)
{
string docType;
if(PageId==”OLD”)
docType= “<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0
Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>”;
else
docType= “<!DOCTYPE html>”

this.DocType.Text= docType;

}