This project is read-only.
Project Description
Visual Studio 2008 XHTML 1.1 Templates is as set of item and project templates for ASP.NET developers using Visual Studio 2008 that provide XHTML 1.1 compliant alternatives to the standard web form and master page templates.

Project FAQ

Templates are included for the following item types:
  • Web Form
  • Master Page
  • AJAX Web Form
  • AJAX Master Page
  • HTML Page
  • StyleSheet
These item templates are available for C# & Visual Basic Web Application Projects and Web Site Projects.

Also includes a fully pre-configured project template for C# Web Application Projects with the following features:
  • web.config pre-configured for strict standards compliance
  • Includes a Master Page and Theme, Theme is pre-configured for entire site via web.config
  • Theme contains a skin file that zeros out the ASP.NET validator controls' inline styling & adds class names to <asp:TextBox>, <asp:Button> & <asp:LinkButton>
  • Default.aspx pre-configured to use Master Page
  • Global.asax contains code to automatically add print specific media attribute to print.css in Theme folder & move meta tag for content type to the top of the page <head>
  • Pre-configured to use the CSS Friendly Control Adapters (Note: this is a reference to a build of the latest source code of the CSS Friendly Control Adapters project, not the release. It also requires a reference update each time you use the template)


The solution includes an installer project for easy installation and removal.

Note about XHTML 1.1 compliance and ASP.NET
In order to force ASP.NET to render its built-in controls as XHTML 1.1 compliant, you must include the following line in the system.web section of your web.config file. Note this does not guarantee compliance, but is required to at least make it possible:

<xhtmlConformance mode="Strict"/>

Sample item template for Web Form:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApp._Default"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="" xml:lang="en" dir="ltr">
<head runat="server">
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>New Page</title>
    <div id="pageContainer">
        <form id="form1" runat="server">

The following image shows the templates available in the Add Item dialog of Visual Studio:


Note before building
If downloading the source files you'll need the MSBuild Community Tasks installed to build the solution.

Last edited Oct 8, 2008 at 10:54 PM by damianedwards, version 11