ListViewSelectEventArgs Class
Provides data for the SelectedIndexChanging event.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
The ListView control raises the SelectedIndexChanging event when a Select button is clicked, but before the ListView control handles the select operation. (A Select a button is one whose CommandName property is set to "Select".) This enables you to provide an event-handling method that performs a custom routine whenever this event occurs, such as canceling the select operation.
A ListViewSelectEventArgs object is passed to the event-handling method, which enables you to determine the index of the item that is selected by the user. It also enables you to cancel the select operation. To cancel the select operation, set the Cancel property of the ListViewSelectEventArgs object to true.
For a list of initial property values for an instance of the ListViewSelectEventArgs class, see the ListViewSelectEventArgs constructor.
The following example shows how to use the ListViewSelectEventArgs object that is passed to the SelectedIndexChanging event to cancel the select operation if the item that was selected is discontinued.
- AspNetHostingPermission
for operating in a hosted environment. Demand value: LinkDemand. Associated enumeration: AspNetHostingPermissionLevel::Minimal
- AspNetHostingPermission
for operating in a hosted environment. Demand value: InheritanceDemand. Associated enumeration: AspNetHostingPermissionLevel::Minimal
System::EventArgs
System.ComponentModel::CancelEventArgs
System.Web.UI.WebControls::ListViewSelectEventArgs
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.