System.Web.UI.WebControls.SortDirection Enumeration

Specifies the direction in which to sort a list of items.

Syntax

public enum SortDirection

Remarks

The System.Web.UI.WebControls.SortDirection enumeration is used to represent the direction in which items are sorted. It is commonly used by properties (such as the GridView.SortDirection property of the System.Web.UI.WebControls.GridView class) to indicate the order in which items are displayed in a control.

Members

Member NameDescription
Ascending

Sort from smallest to largest. For example, from A to Z.

Descending

Sort from largest to smallest. For example, from Z to A.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0