This documentation is archived and is not being maintained.

SearchExpression.SearchType Property

Gets or sets the SearchType value that determines where in the string the search occurs.

Namespace:  System.Web.UI.WebControls.Expressions
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public SearchType SearchType { get; set; }

Property Value

Type: System.Web.UI.WebControls.Expressions.SearchType
The type of search to perform.

The SearchType property uses the SearchType enumeration that contains the search types to use in an instance of the SearchExpression class.

The following table lists the possible enumeration values.




Indicates a search that starts anywhere in a field.


Indicates a search that starts at the beginning of a field.


Indicates a search that at the end of a field.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.