CssRegistration Class
CssRegistration registers a cascading style sheet (CSS) file. CssLink reads this registration to insert a LINK element into the resulting HTML page and apply the external style sheet(s) defined by [T:Microsoft.SharePoint.WebControls.CssRegistration.]
Inheritance Hierarchy
System.Object
System.Web.UI.Control
Microsoft.SharePoint.WebControls.SPControl
Microsoft.SharePoint.WebControls.CssRegistration
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class CssRegistration _
Inherits SPControl
Dim instance As CssRegistration
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class CssRegistration : SPControl
Remarks
Pages and controls register specific style sheets using <SharePoint:CssRegistration name="filename" or the static CssRegistration.Register("filename") method. The cascading style sheet can be registered as a leaf filename or as a URL.
When the page is assembled, all of the style sheets are brought together and rendered by the CssLink control.
Note
The CssRegistration controls may be placed on a master page, page layout, or content page.
Examples
[<SharePoint:CSSRegistrationname="<%$SPrl:~SiteCollection/StyleLibrary/~language/CoreStypes/Band.css%>"/>]
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.