SPWeb.AlternateCssUrl Property
Gets or sets the URL for an alternate cascading style sheet (CSS) to use in the website.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
AlternateCssUrl Example
The following is an example of the AlternateCssUrl property in a static method:
public static bool ToggleAlternateCssUrlProperty(SPWeb web, string alternateCssUrl)
{
try
{
if (!string.IsNullOrEmpty(alternateCssUrl))
{
web.AlternateCssUrl = alternateCssUrl;
web.Update();
return true;
}
}
catch (Exception ex)
{
}
return false;
}
Adam Buenz
SharePoint Foundation MVP - http://www.sharepointsecurity.com
- 10/14/2010
- Adam Buenz - MVP