How to change master page for a specific page in sharepoint

master-pagessharepoint-2007

How can I apply a different master page for two pages within a SharePoint site?

Best Answer

Create a new master page, say custom2.master.

Then go to the page whose master page you wish to alter. Find the <%@ Page %> directive:

<%@ Page language="C#" MasterPageFile="_catalogs/masterpage/<<custom2.master>>" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" %><%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Update its virtual URL in above tag under the MasterPageFile attribute