QueryResultBase.GenerateQueryString, méthode (Microsoft.SharePoint.Portal.WebControls)
The GenerateQueryString method of the QueryResultBase class processes the query template and replaces placeholders with run-time values.
Espace de noms : Microsoft.SharePoint.Portal.WebControls
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)
Syntaxe
'Déclaration
Protected Overridable Function GenerateQueryString ( _
strKeyword As String, _
rgScopeList As ArrayList, _
strWhereAndPart As String, _
<OutAttribute> ByRef strSavedQuery As String _
) As String
'Utilisation
Dim strKeyword As String
Dim rgScopeList As ArrayList
Dim strWhereAndPart As String
Dim strSavedQuery As String
Dim returnValue As String
returnValue = Me.GenerateQueryString(strKeyword, rgScopeList, strWhereAndPart, strSavedQuery)
protected virtual string GenerateQueryString (
string strKeyword,
ArrayList rgScopeList,
string strWhereAndPart,
out string strSavedQuery
)
Paramètres
- strKeyword
Keywords to include in the query.
- rgScopeList
An array of search scopes to include in the query.
- strWhereAndPart
WHERE clause to include in the query.
- strSavedQuery
Out parameter that receives the resulting query.
Valeur de retour
String that contains the resulting query.
Remarques
The GenerateQueryString method replaces placeholders in the query template with run-time values. The placeholders are indicated by "%__ __%" substrings. The following table shows the placeholders implemented in this method, and a short description for each.
Placeholder |
Condition |
---|---|
%__keywordinput__% |
Replaced with the keywords specified in the search box. |
%__keywordinputforcontains__% |
Replaced with the keywords specified in the search box, with encoding for query. |
%__UserIdentity__% |
Replaced with the current user logon value, domain_name\user_name. |
%__Scopes__% |
Replaced with the specified search scopes. |
%__querystring(id)__% |
Replaced with HttpRequest.QueryString["id"], if specified. |
%__formfield(id)__% |
Replace with HttpRequest.Form["id"]. |
Your can extend the template translation process by overriding this method in your derived class.
Voir aussi
Référence
QueryResultBase, classe
Membres QueryResultBase
Microsoft.SharePoint.Portal.WebControls, espace de noms