SearchType 枚举

定义

指定 SearchExpression 类的实例中的搜索类型。Specifies the type of search in an instance of the SearchExpression class.

public enum class SearchType
public enum SearchType
type SearchType = 
Public Enum SearchType
继承
SearchType

字段

Contains 0

指示搜索应确定搜索字符串是否匹配字段中任何位置的字符串。Indicates that a search should determine whether the search string matches a string anywhere in a field.

EndsWith 2

指示搜索应确定搜索字符串是否匹配字段结尾处的字符串。Indicates that a search should determine whether the search string matches a string at the end of a field.

StartsWith 1

指示搜索应确定搜索字符串是否匹配字段开始处的字符串。Indicates that a search should determine whether the search string matches a string at the beginning of a field.

示例

下面的示例演示如何使用标记将SearchExpression筛选器选项设置为: StartsWithThe following example shows how to use markup to set the SearchExpression filter option to StartsWith:

<asp:SearchExpression SearchType="StartsWith" DataFields="Name" >  

注解

筛选器选项在执行SearchType字符串比较时使用枚举。 SearchExpressionThe SearchExpression filter option uses the SearchType enumeration when it performs a string comparison. SearchExpression.SearchType属性设置为SearchType枚举值之一。You set the SearchExpression.SearchType property to one of the SearchType enumeration values.

适用于