tags:

views:

29

answers:

1

I want to populate all the folders in document library to a drop down. I was thinking of using spquery for it but not sure how to retrieve all the folders with it.

A: 

You shoudl use the root folder of the lib and from that folder iterate through its Folders collection. Note that you need to set web.Lists.IncludeRootFolder to true to get access to the root folder. But something I don't understand - folders have a tree-like structure, how do you intend to put them into a flat ddl?

Vladi Gubler
I just want the top folders in a document library...not the lower level folders...let me try ...will update my results...Thanks!!
TLLL