How to differentiate between 'Style Library' and any document library in SharePoint CSOM

Yuvraj Patil 441 Reputation points
2022-06-15T12:24:13.607+00:00

How to differentiate between SharePoint 'Style Library' and any other document library. For other libraries I am able to differentiate using 'BaseTemplate' (ListTemplateType), however 'Style Library' and document libraries both have same base template i.e. 101. 'Style Library' is special system list which I would like to differentiate with other doc libraries.

So could you please help me with this. Thanks in advance !

@RaytheonXie_MSFT

Microsoft 365 and Office | SharePoint | Development
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-06-16T07:45:28.163+00:00

    Hi @Yuvraj Patil ,
    Per my research, Style Library is a document library automatically created by system. It's function is also same with other document library to store files, as its name suggests — is where the system saves CSS files, XSL files, and even images used in page layouts and controls. So we are unable to differ it with other document libraries by base template. They are all 101 too. I have compared some properties of them. And Style Library also don't have any unique properties. We can only differentiate them between List Title or List Id.
    211959-image.png
    Please refer to following document
    https://support.microsoft.com/en-us/office/introduction-to-libraries-7d4221d9-8fb9-40d5-8441-2374c84b5e26


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.