Code Snippet
<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<script runat="server">
protected override void OnLoad(EventArgs e){
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb thisWeb = this.Web)
{
lblWebTemplate.Text = thisWeb.WebTemplate;
lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
}
});
}
</script>
<asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >
<p>
Web Template: <asp:Label ID="lblWebTemplate" runat="server" />
</p>
Web Template ID: <asp:Label ID="lblWebTemplateID" runat="server" />
</asp:Content>
<asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
Site Template Information
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
Site Template Information
</asp:Content>