Register
Home   Ask Question Discuss Purchase Submit Events Give Solutions Share News
Automobiles Beauty & Styles Business Computers & Internet Sports Travel Consumer Electronics Education Entertainment & Music Family Society & Culture Food & Drinks Health
Computer Networking
Hardware
Internet
Programming & Design
Security
Software
Other - Computers
How to find the template used to create Sharepoint site
-->

Issue: How to find the template used to create Sharepoint site

Solution:

Copy the below code and save the page to your layouts folder (usually c:\program files\common files\microsoft shared\web server extensions\12\template\layouts\). Once the page has been saved, you can access it from any of your SharePoint sites via http://yoursharepointsiteaddress/_layouts/pagename.aspx

<%@ 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()
{
  SPWeb thisWeb = this.Web;
  lblWebTempalte.Text = thisWeb.WebTemplate;
  lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
});
}
</script>
<asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >
<p>
Web Template: <asp:Label ID="lblWebTempalte" 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>

--
Bookmark and Share
Related Posts
Comments
Add Comment
Name*
Email*
Comment*
Hot Categories: Programming & Design Royalty Security Internet Other - Family & Relationships Airlines Personal Finance Celebrities
Contact Us About Us Privacy Policy Copyright Sitemap