2

Does someone know the equivalent of SPWeb.AlternateCssUrl in the client side object model?

Thanks

2

There isn't any, Check this MSDN link out for more information,

Here it exists http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spweb_properties.aspx

Client Web it doesn't exists http://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.client.web_properties.aspx

JS.Web property doesn't exits http://msdn.microsoft.com/en-us/library/office/jj244873.aspx

1

The property is exposed in the V16 Client DLLS for SharePoint online

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

0

According to UserVoice driving improvements to SharePoint API Microsoft released SharePoint 2013 and SharePoint Online solution packs that contains the following change to the existing API:

Web object exposes AlternateCssUrl property via CSOM (.Net, REST, JS)

Alternatively you could install the latest versions of SharePoint Server 2013 Client Components SDK or SharePoint Online Client Components SDK

Example:

using (var ctx = new ClientContext(webUri))
{
    ctx.Web.AlternateCssUrl = "/SiteAssets/Contoso.css";
    ctx.Web.Update();
    ctx.ExecuteQuery();
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.