Επεξεργασία

Κοινή χρήση μέσω


DetailsView.OnPageIndexChanging(DetailsViewPageEventArgs) Method

Definition

Raises the PageIndexChanging event.

protected:
 virtual void OnPageIndexChanging(System::Web::UI::WebControls::DetailsViewPageEventArgs ^ e);
protected virtual void OnPageIndexChanging (System.Web.UI.WebControls.DetailsViewPageEventArgs e);
abstract member OnPageIndexChanging : System.Web.UI.WebControls.DetailsViewPageEventArgs -> unit
override this.OnPageIndexChanging : System.Web.UI.WebControls.DetailsViewPageEventArgs -> unit
Protected Overridable Sub OnPageIndexChanging (e As DetailsViewPageEventArgs)

Parameters

e
DetailsViewPageEventArgs

A DetailsViewPageEventArgs that contains the event data.

Exceptions

This method is called when the DetailsView control is not bound to a data source control, the paging operation was not canceled, and an event handler is not registered for the event.

Remarks

The OnPageIndexChanging method is called by the DetailsView control to raise the PageIndexChanging event. It is generally used by control developers when extending the DetailsView class.

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnPageIndexChanging method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnPageIndexChanging(DetailsViewPageEventArgs) in a derived class, be sure to call the base class's OnPageIndexChanging(DetailsViewPageEventArgs) method so that registered delegates receive the event.

Applies to

See also