Export (0) Print
Expand All

ContentByQueryWebPart Class

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

This API is not CLS-compliant. 

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
                      

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

[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.

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

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

Community Additions

ADD
Show:
© 2014 Microsoft