แก้ไข

แชร์ผ่าน


FormView.OnPageIndexChanging(FormViewPageEventArgs) Method

Definition

Raises the PageIndexChanging event.

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

Parameters

e
FormViewPageEventArgs

A FormViewPageEventArgs that contains the event data.

Exceptions

This method is called when the FormView 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 FormView control to raise the PageIndexChanging event. It is generally used by control developers when extending the FormView 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(FormViewPageEventArgs) in a derived class, be sure to call the base class's OnPageIndexChanging(FormViewPageEventArgs) method so that registered delegates receive the event.

Applies to

See also