Export (0) Print
Expand All

RangeType Enumeration

Specifies the type of numeric comparison to use in an instance of the RangeExpression class.

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

public enum RangeType

Member nameDescription
ExclusiveSpecifies a greater-than-or-less-than comparison. Corresponds to the > or < operator.
InclusiveSpecifies an equal-to-or-greater-than comparison or an equal-to-or-less-than comparison. Corresponds to the >= or <= operator.
NoneSpecifies that the search does not have a boundary.

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.

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>

.NET Framework

Supported in: 4.6, 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft