RangeType Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the type of numeric comparison to use in an instance of the RangeExpression class.
public enum class RangeType
public enum RangeType
type RangeType =
Public Enum RangeType
- Inheritance
Fields
Name | Value | Description |
---|---|---|
None | 0 | Specifies that the search does not have a boundary. |
Exclusive | 1 | Specifies a greater-than-or-less-than comparison. Corresponds to the |
Inclusive | 2 | Specifies an equal-to-or-greater-than comparison or an equal-to-or-less-than comparison. Corresponds to the |
Examples
The following example shows how to search the ListPrice column in the Products table of the AdventureWorks database for products that have a list price in the range specified in the FromTextBox
and ToTextBox
text boxes. The filter includes the specified minimum value in search results by using the Inclusive property but excludes the specified maximum value. This code example is part of a larger example provided in Walkthrough: Filtering Data in a Web Page Using Declarative Syntax.
<asp:RangeExpression DataField="ListPrice"
MinType="Inclusive" MaxType="Exclusive">
<asp:ControlParameter ControlID="FromTextBox" />
<asp:ControlParameter ControlID="ToTextBox" />
</asp:RangeExpression>
Remarks
The RangeExpression enumeration is used to indicate whether a value is between two specified values. The enumeration is used in the MinType or MaxType properties of the RangeExpression class.
You specify a minimum and a maximum value. You can include or exclude values that you specified by using the RangeType class.
The following table describes the enumeration values.
Enumeration | Description |
---|---|
None | Specifies that the search does not have a boundary. |
Inclusive | Performs a greater-than-or-less-than comparison. Corresponds to the >= or <= operation. |
Exclusive | Performs a greater-than-or-less-than comparison. Corresponds to the > or < operation. |