Share via


SPWeb.SearchListItems Method (String)

This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Use the Execute method of the Microsoft.SharePoint.Search.Query.KeywordQuery class or the Microsoft.SharePoint.Search.Query.FullTextSqlQuery class instead.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function SearchListItems ( _
    strSearchTerm As String _
) As SPSearchResultCollection
'Usage
Dim instance As SPWeb
Dim strSearchTerm As String
Dim returnValue As SPSearchResultCollection

returnValue = instance.SearchListItems(strSearchTerm)
public SPSearchResultCollection SearchListItems(
    string strSearchTerm
)

Parameters

  • strSearchTerm
    Type: System.String

    The term to search for in the lists.

Return Value

Type: Microsoft.SharePoint.SPSearchResultCollection
The search results.

Remarks

This method requires that Microsoft SQL Server be installed on the server and that full-text search is enabled in SharePoint Foundation Central Administration.

See Also

Reference

SPWeb Class

SPWeb Members

SearchListItems Overload

Microsoft.SharePoint Namespace