This documentation is archived and is not being maintained.

ListViewUpdatedEventArgs Class

Provides data for the ItemUpdated event.

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

[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class ListViewUpdatedEventArgs : public EventArgs

The ListView control raises the ItemUpdated event when the UpdateItem method is called or when an Update button in the control is clicked, but after the ListView control updates the item. (An Update button is a button whose CommandName property is set to "Update".) This enables you to provide an event-handling method that performs a custom routine whenever this event occurs, such as checking the results of an update operation.

A ListViewUpdatedEventArgs object is passed to the event-handling method. This object enables you to determine the number of items updated and to get any exceptions that might have occurred. To determine the number of items that were affected by the update operation, use the AffectedRows property. To determine whether any exceptions occurred, use the Exception property. You can indicate whether the exception was handled in the event-handling method by setting the ExceptionHandled property. You can access the original field values by using the OldValues property. You can access updated field values by using the NewValues property.

By default, the ListView item returns to read-only mode after an update operation. If you handle an exception that occurred during the update operation, you can keep the ListView item in edit mode by setting the KeepInEditMode property to true.

For a list of initial property values for an instance of the ListViewUpdatedEventArgs class, see the ListViewUpdatedEventArgs constructor.

The following example shows how to use the ListViewUpdatedEventArgs object to determine whether an exception occurred during an update operation.

Security noteSecurity Note:

This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

No code example is currently available or this language may not be supported.

System::Object
  System::EventArgs
    System.Web.UI.WebControls::ListViewUpdatedEventArgs

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.5
Show: