RangeExpression.MaxType 属性

定义

获取或设置范围的最大值。

public:
 property System::Web::UI::WebControls::Expressions::RangeType MaxType { System::Web::UI::WebControls::Expressions::RangeType get(); void set(System::Web::UI::WebControls::Expressions::RangeType value); };
public System.Web.UI.WebControls.Expressions.RangeType MaxType { get; set; }
member this.MaxType : System.Web.UI.WebControls.Expressions.RangeType with get, set
Public Property MaxType As RangeType

属性值

要用于最大值的比较的类型。 默认值为 None,指示不执行最大值比较。

示例

以下示例演示如何包括范围中指定的最小值以及如何排除最大值。 最大值和最小值将输入到文本框中。 此代码示例是 演练:使用声明性语法筛选网页中的数据中提供的更大示例的一部分。

<asp:RangeExpression DataField="ListPrice"    
    MinType="Inclusive" MaxType="Exclusive">  
  <asp:ControlParameter ControlID="FromTextBox" />  
  <asp:ControlParameter ControlID="ToTextBox" />  
</asp:RangeExpression>  

注解

此属性 Inclusive的可能值为 、 ExclusiveNone

MaxType当 设置为 Inclusive时,搜索结果中将包含范围的最大值。 这等效于执行 >= 操作。 如果将 属性设置为 Exclusive 字段,则它等效于指定 > 或 < 操作。 如果将 属性设置为 None,则不会对范围施加任何限制。

适用于