要添加到Kobi 的答案,您可以使用委托控制功能进行部署。
在 下放置一个用户控件_controltemplates
,例如:
<%@ Control 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" %>
<SharePoint:CssRegistration name="/_layouts/custom/app.css" runat="server"/>
编写委托控制功能(这里是elements.xml):
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control ControlSrc="~/_ControlTemplates/CustomBranding.ascx"
Id="AdditionalPageHead" Sequence="1" />
</Elements>
在_layouts/custom/app.css
.