A Web Part object that is used to retrieve dynamic information.
This class is not CLS-compliant.
Namespace: Microsoft.SharePoint.Publishing.WebControls
Assembly: Microsoft.SharePoint.Publishing (in microsoft.sharepoint.publishing.dll)
Visual Basic (Declaration)
<XmlRootAttribute(Namespace:="urn:schemas-microsoft-com:ContentByQueryWebPart")> _
<CLSCompliantAttribute(False)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
Public Class ContentByQueryWebPart
Inherits CmsDataFormWebPart
Implements INamingContainer, IWebPartVariationUpdate
Dim instance As ContentByQueryWebPart
[XmlRootAttribute(Namespace="urn:schemas-microsoft-com:ContentByQueryWebPart")]
[CLSCompliantAttribute(false)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, 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.
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.Panel
System.Web.UI.WebControls.WebParts.Part
System.Web.UI.WebControls.WebParts.WebPart
Microsoft.SharePoint.WebPartPages.WebPart
Microsoft.SharePoint.WebPartPages.BaseXsltDataWebPart
Microsoft.SharePoint.WebPartPages.DataFormWebPart
Microsoft.SharePoint.Publishing.WebControls.CmsDataFormWebPart
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart
Microsoft.SharePoint.Portal.WebControls.ListingSummary
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.