ListViewCancelMode Enumeration
.NET Framework 4
Determines the type of operation that the user was performing when the Cancel button was clicked in a ListView item.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
The ListViewCancelMode enumeration is used to represent the type of operation that the user was performing when the Cancel button was clicked in a ListView item. (A Cancel button is a button whose CommandName property set to "Cancel".)
The following example shows how to use the ListViewCancelMode enumeration to check which operation is being canceled in a ListView item.
protected void ContactsListView_ItemCanceling(object sender, ListViewCancelEventArgs e) { //Check the operation that raised the event if (e.CancelMode == ListViewCancelMode.CancelingEdit) { // The update operation was canceled. Display the // primary key of the item. Message.Text = "Update for the ContactID " + ContactsListView.DataKeys[e.ItemIndex].Value.ToString() + " canceled."; } else { Message.Text = "Insert operation canceled."; } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.