Preaching SharePoint

SPSiteDataQuery on Specific Lists in SharePoint


Quick Tip - How to run SPSiteDataQuery on Specific Lists in SharePoint.
SPSiteDataQuery - Describes a query performed across multiple lists, which may be located in multiple Web sites in the same Web site collection. You Can query multiple lists/Libraries of same kind for common fields in them. This Query returns a Datatable,which can be used as a source to  GridView control etc.
In addition to this you can also Specify the List's to search in the scope! You need to provide the Guid of the List for that .
query.Lists = "<Lists><List Id="ListName">ListId</Lists> ";



Responses

0 Respones to "SPSiteDataQuery on Specific Lists in SharePoint"

Post a Comment

 

Do you want SharePoint 2013 to inherit Metro Style design?

Search This Blog

Return to top of page Copyright © 2010 | Platinum Theme Converted into Blogger Template by HackTutors