Share via


QueryResultBase Class

The QueryResultBase class implements the base class for Web Parts that handle search query results.

System.Object

   Microsoft.SharePoint.Portal.WebControls.DataResultBase

      

Visit Microsoft.SharePoint.WebControls.IDesignTimeHtmlProvider

         Microsoft.SharePoint.WebControls.IDesignTimeHtmlProvider.QueryResultBase

Public Constructors

The following table shows the constructors of the QueryResultBase class and a brief description of each.

Name Description
QueryResultBase Initializes a new instance of the QueryResultBase class.

Public Fields

The following table shows the fields of the QueryResultBase class and a brief description of each.

Name Description
m_bAllSearchSourcesSelected Contains a flag that indicated whether all content sources for the current portal site are included in the query that is executed by this class. Default is false.
m_strContextSensitiveScopRealName Reserved for internal use only.
m_strKeywords Contains keywords used in the query string.
m_strQueryIssued Reserved for internal use only.

Public Methods

The following table shows the public methods of the QueryResultBase class and a brief description of each.

Name Description
GetSearchDisplayTitle(System.Data.DataRow, String, String) Reserved for internal use only.

Protected Methods

The following table shows the protected methods of the QueryResultBase class and a brief description of each.

Name Description
GenerateHtmlForItemIcon(System.Data.DataRow, Int32, Int32, String) Override if your derived class need to generate different HTML for the icon for each result item.
GenerateHtmlForRowColumn(System.Data.DataRow, System.Text.StringBuilder, Int32) Override if your derived class needs to generate different HTML for a column of a DataRow.
GenerateHtmlOneRowForOneItem(System.Data.DataRow, System.Text.StringBuilder, Int32, String, Int32, Int32) Override if your derived class needs to generate different HTML for one HTML row.
GenerateMenuButtonHtmlForItem(System.Data.DataRow, Int32, String) Override to associate an ECB button with this item.
GenerateQueryString(String, System.Collections.ArrayList, String, String) Processes the query template and replaces placeholders with runtime values.
GetCurrentRow Override to get the current row in the search result set.
GetItemUrl(System.Data.DataRow) Gets the URL of the specifed DataRow that represents one item in the result set.
GetQueryResults(object) Override and use in conjunction with IssueQuery if your derived class needs to support asynchronous queries.
GetTotalResultRowNumber Gets the total number of rows in the result set.
IsBestBet(System.Data.DataRow) Gets a flag that indicates whether the specified search result is a best bet.
IssueQuery(String, Int32, Int32) Executes the specified query. Returns a unique identifier for the query in the case of an asychronous query. Returns a DataSet with the query results if the query executed without errors. Otherwise it returns null, indicating that no query was issued.
OnInit(object, System.EventArgs) Overrides the Microsoft.SharePoint.WebPartPages.WebPart.OnInit method. Raises the System.Web.UI.Control.Init event that occurs as this Web Part is instantiated.
OnPreRender(object, System.EventArgs) Overrides the Microsoft.SharePoint.WebPartPages.WebPart.OnPreRender method. Raises the System.Web.UI.Control.PreRender event that occurs immediately before the Web Part is rendered to its containing Web Part page.
RenderWebPart(System.Web.UI.HtmlTextWriter) Overrides the Microsoft.SharePoint.WebPartPages.WebPart.RenderWebPart method. Renders the HTML for the body of this Web Part to the client.

Public Properties

The following table shows the public properties of the QueryResultBase class, the data type of each property, and a brief description of each.

Name Data Type Description
QueryTemplateFromPart String Gets or sets the FROM clause of the query template used by Web Parts that derive from this class.
QueryTemplateOrderByPart String Gets or sets the ORDER BY clause of the query template used by Web Parts that derive from this class.
QueryTemplateSelectPart String Gets or sets the SELECT clause of the query template used by Web Parts that derive from this class.
QueryTemplateWherePart String Gets or sets the WHERE clause of the query template used by Web Parts that derive from this class.

Protected Properties

The following table shows the protected properties of the QueryResultBase class, the data type of each property, and a brief description of each.

Name Data Type Description
DefaultScopes String Gets or sets the default search scopes for the query run by Web Parts that derive from this class.
QueryTemplate String Gets the query template used by Web Parts that derive from this class. The template is a concatanation of values from the QueryTemplateSelectPart, QueryTemplateFromPart, QueryTemplateWherePart and QueryTemplateOrderByPart properties.
SearchScopes String Reserved for internal use only.
SiteName String Reserved for internal use only.

Thread Safety

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

Requirements

Namespace: Microsoft.SharePoint.Portal.WebControls

Platforms: Microsoft Windows Server 2003

Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Security: Code Access Security