SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when I'm getting all the lists with my Client program from a specific SharePoint server, I'm getting quite a lot of them, but I'd like to present to the user only the Document Libraries. How can I do this? I saw that a Library can be named anything, not only "Shared Documents", so there must be another possibility? I'm currently using WSS/SOAP and talking to the _vti_bin/lists.asmx service with GetListsCollection method, but any clue will be helpful.

Thank you

share|improve this question

Part of the response for each list is the attribute BaseType which is a string representation of the numeric value from the enumeration SPBaseType for each list.

BaseType="1" for DocumentLibrary

share|improve this answer
cool. thanks a lot. – Igor Jul 22 '12 at 11:33

I stumbled upon this question but I was looking for Server Object model code. Below code helped me and maybe will help someone else too.

                if (objList.BaseType == SPBaseType.DocumentLibrary)
                    //Call function
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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