ContentByQueryWebPart class
Collapse the table of content
Expand the table of content

ContentByQueryWebPart class

A Web Part object that is used to retrieve dynamic information.

This API is not CLS-compliant. 


Namespace:  Microsoft.SharePoint.Publishing.WebControls
Assembly:  Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class ContentByQueryWebPart : CmsDataFormWebPart, 
	INamingContainer, IWebPartVariationUpdate

A ContentByQueryWebPart object uses the CrossListQueryCache object to retrieve data. The data retrieved is cleaned and then sent to the XSLT engine. The XSLT engine uses the defaultHeader.xsl, defaultItem.xsl, and defaultMain.xsl files to translate the data into HTML markup that is presented to the user. You can customize the HTML output of the ContentByQueryWebPart by using the XSL transform. The DataProcessDelegate allows you to retrieve data to be modified before it is sent to the XSLT engine. If the P[:Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.Data] property of this Web Part is specified, the data is not retrieved and the specified data is used instead. The ContentByQueryWebPart object derives from the CmsDataFormWebPart object that caches XSLT transforms.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2016 Microsoft