ListView.PagePropertiesChanging Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when the page properties change, but before the ListView control sets the new values.

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

member PagePropertiesChanging : IEvent<EventHandler<PagePropertiesChangingEventArgs>,
    PagePropertiesChangingEventArgs>

The PagePropertiesChanging event is raised when the page properties change, but before the ListView control sets the new values by using the SetPageProperties method. This enables you to perform a custom routine whenever this event occurs, such as clearing the SelectedIndex or EditIndex properties.

A PagePropertiesChangingEventArgs object is passed to the event handler, which enables you to determine the index of the first record displayed on the page. It also lets you determine the maximum number of items to display on a single page.

For more information about how to handle events, see NIB: Consuming Events.

The following example shows how create an event handler for the PagePropertiesChanging event.

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

.NET Framework
Available since 3.5
Return to top
Show: