Created
April 20, 2012 13:52
-
-
Save douglas-mason/2428861 to your computer and use it in GitHub Desktop.
Public property to set doctype in master page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Default : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
master_pages_core master = (master_pages_core)this.Master; | |
master.DocType = "<!DOCTYPE html>"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="core.master.cs" Inherits="master_pages_core" %> | |
<% =DocType%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; | |
public string DocType | |
{ | |
get { return docType; } | |
set { docType = value; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment