Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Wednesday, November 30, 2011

Sample Code Custom Master Page

<%@Master language="C#"%>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="Welcome" src="~/_controltemplates/Welcome.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="DesignModeConsole" src="~/_controltemplates/DesignModeConsole.ascx" %>
<HTML dir="<%$Resources:wss,multipages_direction_dir_value%>" runat="server" xmlns:o="urn:schemas-microsoft-com:office:office">
<HEAD runat="server">
 <META Name="GENERATOR" Content="Microsoft SharePoint">
 <META Name="progid" Content="SharePoint.WebPartPage.Document">
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
 <META HTTP-EQUIV="Expires" content="0">
 <SharePoint:RobotsMetaTag runat="server"/>
 <Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server"/></Title>
 <SharePoint:CssLink runat="server"/>
 <SharePoint:Theme runat="server"/>
 <SharePoint:ScriptLink language="javascript" name="core.js" Defer="true" runat="server"/>
 <SharePoint:CustomJSUrl runat="server"/>
 <SharePoint:SoapDiscoveryLink runat="server"/>
 <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>
 <SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>
 <meta name="Microsoft Theme" content="Petal 1011, default">
</HEAD>
<BODY scroll="yes" onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
  <form runat="server" onsubmit="return _spFormOnSubmitWrapper();">
   <WebPartPages:SPWebPartManager id="m" runat="Server"/>
<table width="100%">
<tr>
<td>
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<table align="right">
<tr>
<td align="right">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" id="DelegateControl1"/>
</td>
</tr>
</table>
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
   <table width="100%">
   <tr>
   <td>
     <asp:ContentPlaceHolder ID="WSSDesignConsole" runat="server">
  <wssuc:DesignModeConsole id="IdDesignModeConsole" runat="server"/>
 </asp:ContentPlaceHolder>
   </td>
   </tr>
   <tr>
   <td>
   <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server">
  <table CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH="100%">
  <tr>
   <td colspan=4 class="ms-globalbreadcrumb">
   <span id="TurnOnAccessibility" style="display:none">
      <a href="#" class="ms-skip" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();return false;">
   <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnonaccessibility%>" EncodeMethod="HtmlEncode"/></a>
   </span>
   <A href="javascript:;" onclick="javascript:this.href='#mainContent';" class="ms-skip" AccessKey="<%$Resources:wss,maincontent_accesskey%>" runat="server">
   <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,mainContentLink%>" EncodeMethod="HtmlEncode"/></A>
   <table cellpadding=0 cellspacing=0 height=100% class="ms-globalleft">
     <tr>
   <td class="ms-globallinks" style="padding-top: 2px;" height=100% valign=middle>
    <div>
     <span id="TurnOffAccessibility" style="display:none">
    <a href="#" class="ms-acclink" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();return false;">
    <SharePoint:EncodedLiteral runat="server" text="<%$Resources:wss,master_turnoffaccessibility%>" EncodeMethod="HtmlEncode"/></a>
     </span>
     <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server">
    <asp:SiteMapPath SiteMapProvider="SPSiteMapProvider" id="GlobalNavigationSiteMap" RenderCurrentNodeAsLink="true" SkipLinkText="" NodeStyle-CssClass="ms-sitemapdirectional" runat="server"/>
     </asp:ContentPlaceHolder>
     </div>
    </td>
     </tr>
   </table>
   <table cellpadding="0" cellspacing="0" height=100% class="ms-globalright">
    <tr>
     <td valign="middle" class="ms-globallinks" style="padding-left:3px; padding-right:6px;">
     <SharePoint:DelegateControl runat="server" ControlId="GlobalSiteLink0"/>
     </td>
    <td valign="middle" class="ms-globallinks">
   <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false">
   </wssuc:Welcome>
    </td>
    <td style="padding-left:1px;padding-right:3px;" class="ms-globallinks">|</td>
     <td valign="middle" class="ms-globallinks">
    <table cellspacing="0" cellpadding="0">
     <tr>
      <td class="ms-globallinks">
     <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server"/></td>
      <td class="ms-globallinks">
     <SharePoint:DelegateControl ControlId="GlobalSiteLink2" Scope="Farm" runat="server"/></td>
     </tr>
    </table>
     </td>
     <td valign="middle" class="ms-globallinks">&nbsp;
    <a href="javascript:TopHelpButtonClick('NavBarHelpHome')" AccessKey="<%$Resources:wss,multipages_helplink_accesskey%>" id="TopHelpLink" title="<%$Resources:wss,multipages_helplinkalt_text%>" runat="server"><img align='absmiddle' border=0 src="/_layouts/images/helpicon.gif" alt="<%$Resources:wss,multipages_helplinkalt_text%>" runat="server"></a>
     </td>
     <td class="ms-siteactionsmenu" id="siteactiontd">
     <SharePoint:SiteActions runat="server" AccessKey="<%$Resources:wss,tb_SiteActions_AK%>" id="SiteActionsMenuMain"
      PrefixHtml="&lt;div&gt;&lt;div&gt;"
      SuffixHtml="&lt;/div&gt;&lt;/div&gt;"
      MenuNotVisibleHtml="&amp;nbsp;">
      <CustomTemplate>
      <SharePoint:FeatureMenuTemplate runat="server"
       FeatureScope="Site"
       Location="Microsoft.SharePoint.StandardMenu"
       GroupId="SiteActions"
       UseShortId="true"
       >
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Create"
        Text="<%$Resources:wss,viewlsts_pagetitle_create%>"
        Description="<%$Resources:wss,siteactions_createdescription%>"
        ImageUrl="/_layouts/images/Actionscreate.gif"
        MenuGroupId="100"
        Sequence="100"
        UseShortId="true"
        ClientOnClickNavigateUrl="~site/_layouts/create.aspx"
        PermissionsString="ManageLists, ManageSubwebs"
        PermissionMode="Any" />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_EditPage"
        Text="<%$Resources:wss,siteactions_editpage%>"
        Description="<%$Resources:wss,siteactions_editpagedescription%>"
        ImageUrl="/_layouts/images/ActionsEditPage.gif"
        MenuGroupId="100"
        Sequence="200"
        ClientOnClickNavigateUrl="javascript:MSOLayout_ChangeLayoutMode(false);"
        />
       <SharePoint:MenuItemTemplate runat="server" id="MenuItem_Settings"
        Text="<%$Resources:wss,settings_pagetitle%>"
        Description="<%$Resources:wss,siteactions_sitesettingsdescription%>"
        ImageUrl="/_layouts/images/ActionsSettings.gif"
        MenuGroupId="100"
        Sequence="300"
        UseShortId="true"
        ClientOnClickNavigateUrl="~site/_layouts/settings.aspx"
        PermissionsString="EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"
        PermissionMode="Any" />
      </SharePoint:FeatureMenuTemplate>
      </CustomTemplate>
     </SharePoint:SiteActions>
     </td>
     </tr>
  
   </table>
   </td>
     </tr>
     </table>
   </asp:ContentPlaceHolder>
   </td>
   </tr>
   <tr>
   <td colspan="6">
   <table width="100%" bgcolor="aqua">
   <tr>
   <td>
   <a href="#" style="text-decoration:none;color:purple"><p><font size="2px"><center>Home</center></font></p></a>
   </td>
   <td>
   <a href="#" style="text-decoration:none;color:purple"><p><font size="2px"><center>Lists</center></font></p></a>
   </td>
   <td>
   <a href="#" style="text-decoration:none;color:purple"><p><font size="2px"><center>Document Libraries</center></font></p></a>
   </td>
   <td>
   <a href="#" style="text-decoration:none;color:purple"><p><font size="2px"><center>Picture Libraries</center></font></p></a>
   </td>
   <td>
   <a href="#" style="text-decoration:none;color:purple"><p><font size="2px"><center>TopSite</center></font></p></a>
   </td>
   </tr>
   </table>
   </td>
   </tr>
   </table>
   <table width="100%">
   <tr>
   <td>
 
    <asp:ContentPlaceHolder id="PlaceHolderPageDescription" runat="server"/>
 
   </td>
   </tr>
   <tr>
   <td>
 
    <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server">
    </asp:ContentPlaceHolder>
 
   </td>
   </tr>
   </table>
   <asp:Panel Visible="false" ID="pnlplaceholders" runat="server">
    <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarDataSource" runat="server" />
     <asp:ContentPlaceHolder id="PlaceHolderCalendarNavigator" runat="server" />
     <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarTop" runat="server"/>
     <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server"></asp:ContentPlaceHolder>
     <asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server"></asp:ContentPlaceHolder>
     <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarBorder" runat="server"></asp:ContentPlaceHolder>
     <asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" runat="server"></asp:ContentPlaceHolder>
     <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server"></asp:ContentPlaceHolder>
     <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"/>
 <asp:ContentPlaceHolder id="PlaceHolderBodyAreaClass" runat="server"/>
 <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server" />
   <asp:ContentPlaceHolder id="PlaceHolderPageImage" runat="server" />
            <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" />
   </asp:Panel>
  </form>
</BODY>
</HTML>

No comments:

Post a Comment