改自MOSS2007自带的空模板,为了便于布局将所有的ContentPlaceHolder都隐藏于DIV里面了.
<% @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 " __expr - val - dir = " ltr " > < 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 " /> </ HEAD > < BODY scroll = " yes " onload = " javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper(); " > <!-- 以下为设计部分,下面不需要动 --> <!-- 必须有的 --> < WebPartPages:SPWebPartManager id = " m " runat = " Server " /> <!-- /// /必须有的--> <!-- 必须有的 --> < PlaceHolder id = " MSO_ContentDiv " runat = " server " > <!-- 必须有的 --> < asp:ContentPlaceHolder id = " PlaceHolderMain " runat = " server " > </ asp:ContentPlaceHolder > <!-- /// 必须有的--> </ PlaceHolder > <!-- /// /必须有的--> <!-- 以上为设计部分,下面不需要动 --> <!-- 快速启动 --> < div style = " display:none " > < asp:ContentPlaceHolder id = " PlaceHolderLeftNavBar " runat = " server " > </ asp:ContentPlaceHolder > <!-- 快速启动 --> <!-- 页首工具栏 --> < asp:ContentPlaceHolder id = " PlaceHolderGlobalNavigation " runat = " server " > < asp:ContentPlaceHolder id = " PlaceHolderGlobalNavigationSiteMap " runat = " server " > < asp:SiteMapPath SiteMapProvider = " SPSiteMapProvider " id = " GlobalNavigationSiteMap " RenderCurrentNodeAsLink = " true " SkipLinkText = "" NodeStyle - CssClass = " ms-sitemapdirectional " runat = " server " /> </ asp:ContentPlaceHolder > </ asp:ContentPlaceHolder > <!-- 页首工具栏 --> <!-- 站点导航栏 --> < asp:ContentPlaceHolder id = " PlaceHolderTitleBreadcrumb " runat = " server " > < asp:SiteMapPath SiteMapProvider = " SPContentMapProvider " id = " ContentMap " SkipLinkText = "" NodeStyle - CssClass = " ms-sitemapdirectional " runat = " server " /> & nbsp; </ asp:ContentPlaceHolder > <!-- 站点导航栏 --> <!-- 主导航栏 --> < asp:ContentPlaceHolder id = " PlaceHolderTopNavBar " runat = " server " > < asp:ContentPlaceHolder id = " PlaceHolderHorizontalNav " runat = " server " > </ asp:ContentPlaceHolder > </ asp:ContentPlaceHolder > <!-- 主导航栏 --> <!-- 站点名 --> < asp:ContentPlaceHolder id = " PlaceHolderSiteName " runat = " server " > </ asp:ContentPlaceHolder > <!-- 站点名 --> <!-- 搜索栏,如加载入模板页不好使就加到.aspx页面去 --> < asp:ContentPlaceHolder id = " PlaceHolderSearchArea " runat = " server " > < SharePoint:DelegateControl runat = " server " ControlId = " SmallSearchInputBox " /> </ asp:ContentPlaceHolder > <!-- 搜索栏,如加载入模板页不好使就加到.aspx页面去 --> <!-- 站点图标 --> <!--< SharePoint:SiteLogoImage id = " onetidHeadbnnr0 " LogoImageUrl = " /_layouts/images/titlegraphic.gif " runat = " server " __designer:Preview = " <img id =& quot;ctl00_onetidHeadbnnr0 & quot; Src =& quot; / _layouts / images / titlegraphic.gif & quot; alt =& quot; & quot; style =& quot;border - width:0px; & quot; /& gt; " __designer:Values= " & lt;P N = ' ID ' T = ' onetidHeadbnnr0 ' /& gt; & lt;P N = ' LogoImageUrl ' T = ' /_layouts/images/titlegraphic.gif ' /& gt; & lt;P N = ' Font ' ID = ' 1 ' /& gt; & lt;P N = ' ControlStyle ' & gt; & lt;P N = ' Font ' R = ' 1 ' /& gt; & lt; / P & gt; & lt;P N = ' Page ' ID = ' 2 ' /& gt; & lt;P N = ' TemplateControl ' ID = ' 3 ' /& gt; & lt;P N = ' AppRelativeTemplateSourceDirectory ' R = ' -1 ' /& gt; " /> --> <!-- 站点图标 --> <!-- 编辑栏 --> < asp:ContentPlaceHolder ID = " WSSDesignConsole " runat = " server " > < wssuc:DesignModeConsole id = " IdDesignModeConsole " runat = " server " /> </ asp:ContentPlaceHolder > < asp:ContentPlaceHolder ID = " SPNavigation " runat = " server " > < SharePoint:DelegateControl runat = " server " ControlId = " PublishingConsole " PrefixHtml = " <tr><td colspan="4" id="mpdmconsole" class =& quot;ms - consolemptablerow & quot; & gt; " SuffixHtml = " </td></tr> " > </ SharePoint:DelegateControl > </ asp:ContentPlaceHolder > <!-- 编辑栏 --> <!-- 以下是一些不明所以的部分,大部分是占位符,起修饰作用的东东 --> - 1 - < asp:ContentPlaceHolder id = " PlaceHolderTitleLeftBorder " runat = " server " > < div class = " ms-titleareaframe " >< IMG SRC = " /_layouts/images/blank.gif " width = 1 height = 100 % alt = "" ></ div > </ asp:ContentPlaceHolder > - 2 - < asp:ContentPlaceHolder id = " PlaceHolderPageTitleInTitleArea " runat = " server " /> - 3 - < asp:ContentPlaceHolder id = " PlaceHolderPageImage " runat = " server " /> - 4 - < asp:ContentPlaceHolder id = " PlaceHolderMiniConsole " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderTitleRightMargin " runat = " server " > < div class = " ms-titleareaframe " style = ' height:100% ' >< IMG SRC = " /_layouts/images/blank.gif " width = 1 height = 1 alt = "" ></ div > </ asp:ContentPlaceHolder > - 5 - < asp:ContentPlaceHolder id = " PlaceHolderTitleAreaSeparator " runat = " server " /> - 6 - < asp:ContentPlaceHolder id = " PlaceHolderLeftNavBarDataSource " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderCalendarNavigator " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderLeftNavBarTop " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderLeftActions " runat = " server " ></ asp:ContentPlaceHolder > - 7 - < asp:ContentPlaceHolder id = " PlaceHolderNavSpacer " runat = " server " >< IMG SRC = " /_layouts/images/blank.gif " width = 138 height = 1 alt = "" ></ asp:ContentPlaceholder > - 8 - < asp:ContentPlaceHolder id = " PlaceHolderLeftNavBarBorder " runat = " server " ></ asp:ContentPlaceHolder > - 9 - < asp:ContentPlaceHolder id = " PlaceHolderBodyLeftBorder " runat = " server " > < div class = " ms-pagemargin " >< IMG SRC = " /_layouts/images/blank.gif " width = 10 height = 1 alt = "" ></ div > </ asp:ContentPlaceHolder > - 10 - < asp:ContentPlaceHolder id = " PlaceHolderBodyRightMargin " runat = " server " > < div class = " ms-pagemargin " >< IMG SRC = " /_layouts/images/blank.gif " width = 10 height = 1 alt = "" ></ div > </ asp:ContentPlaceHolder > - 11 - < asp:ContentPlaceHolder id = " PlaceHolderPageDescription " runat = " server " /> - 12 - <!-- 这个要添加,因为若不加这标签则Webpart的编辑工具栏则会显示在网页的下面,从而使整个网站的结构乱掉 --> <!-- < PlaceHolder id = " MSO_ContentDiv1111 " runat = " server " ></ PlaceHolder >--> - 13 - < asp:ContentPlaceHolder id = " PlaceHolderFormDigest " runat = " server " > < SharePoint:FormDigest runat = server /> </ asp:ContentPlaceHolder > - 14 - < asp:ContentPlaceHolder id = " PlaceHolderUtilityContent " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderBodyAreaClass " runat = " server " /> < asp:ContentPlaceHolder id = " PlaceHolderTitleAreaClass " runat = " server " /> </ div > <!-- 以下是一些不明所以的部分,大部分是占位符,起修饰作用的东东 --> <!------------------------------------------------------------------------------------------- -------------------------------------------------------------> </ BODY > </ HTML >