Compartir a través de


: QueryResultBase.GenerateQueryString (Método) (Microsoft.SharePoint.Portal.WebControls)

The GenerateQueryString method of the QueryResultBase class processes the query template and replaces placeholders with run-time values.

Espacio de nombres:
Ensamblado: Microsoft.SharePoint.Portal (in microsoft.sharepoint.portal.dll)

Sintaxis

'Declaración
Protected Overridable Function GenerateQueryString ( _
    strKeyword As String, _
    rgScopeList As ArrayList, _
    strWhereAndPart As String, _
    <OutAttribute> ByRef strSavedQuery As String _
) As String
'Uso
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
)

Parámetros

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

Valor devuelto

String that contains the resulting query.

Comentarios

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.

Vea también

Referencia

QueryResultBase (Clase)
QueryResultBase (Miembros)
Microsoft.SharePoint.Portal.WebControls (Espacio de nombres)