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 ,則不會對範圍施加任何限制。

適用於