ContentBySearchWebPart class
SharePoint Online
The ContentBySearchWebPart is a Web Part introduced in SharePoint Server 2013 that can display dynamic content that was previously crawled and added to the search index.
Each Web Part instance is associated with a search query and shows the results for that particular search query. When users browse to a page that contains a ContentBySearchWebPart, the search query is automatically issued and the corresponding search results are returned from the search index.
You can use display templates, which are snippets of HTML and JavaScript, to change how search results appear on the page. Display templates render information returned by SharePoint; the information is inserted into the page in JSON format.
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.Office.Server.Search.WebControls.ScriptWebPart
Microsoft.Office.Server.Search.WebControls.DisplayScriptWebPart
Microsoft.Office.Server.Search.WebControls.ResultScriptWebPart
Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart
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.Office.Server.Search.WebControls.ScriptWebPart
Microsoft.Office.Server.Search.WebControls.DisplayScriptWebPart
Microsoft.Office.Server.Search.WebControls.ResultScriptWebPart
Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart
Namespace: Microsoft.Office.Server.Search.WebControls
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
[ScriptDescriptorComponentTypeAttribute("Srch.ContentBySearch")] [AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] [SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)] [AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)] public class ContentBySearchWebPart : ResultScriptWebPart
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.Office.Server.Search.WebControls.ScriptWebPart
Microsoft.Office.Server.Search.WebControls.DisplayScriptWebPart
Microsoft.Office.Server.Search.WebControls.ResultScriptWebPart
Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart
Microsoft.Office.Server.Search.WebControls.CatalogItemReuseWebPart
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.Office.Server.Search.WebControls.ScriptWebPart
Microsoft.Office.Server.Search.WebControls.DisplayScriptWebPart
Microsoft.Office.Server.Search.WebControls.ResultScriptWebPart
Microsoft.Office.Server.Search.WebControls.ContentBySearchWebPart
Microsoft.Office.Server.Search.WebControls.CatalogItemReuseWebPart
Show: