Web Dev Share Etc.
Web, Html, Css, Jquery, .NET, Sharepoint, Technology etc.
Friday, December 21, 2012
SharePoint 2010 - Recursive Query in List/Library
CAML query is by default non recursive. If you execute a CAML query, you will end up with items from the list root folder.
You have to define extra query options as shown below in case you want to query all folders and sub folders within a list (Recursive Query) :
query.ViewAttributes = "Scope='Recursive'";
Share to Twitter
Share to Facebook
Share to Pinterest