DetailsView.OnItemDeleting(DetailsViewDeleteEventArgs) 方法

定义

引发 ItemDeleting 事件。Raises the ItemDeleting event.

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

参数

e
DetailsViewDeleteEventArgs

包含事件数据的 DetailsViewDeleteEventArgsA DetailsViewDeleteEventArgs that contains the event data.

异常

没有 ItemDeleting 事件的处理程序。There is no handler for the ItemDeleting event.

注解

OnItemDeleting方法ItemDeleting由控件调用以引发事件。 DetailsViewThe OnItemDeleting method is called by the DetailsView control to raise the ItemDeleting event. 在扩展DetailsView类时, 控件开发人员通常会使用此方法。It is generally used by control developers when extending the DetailsView class.

OnItemDeleting 方法还允许派生类对事件进行处理而不必附加委托。The OnItemDeleting 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.

继承者说明

在派生类中重写 OnItemDeleting(DetailsViewDeleteEventArgs) 时,一定要调用基类的 OnItemDeleting(DetailsViewDeleteEventArgs) 方法,以便已注册的委托对事件进行接收。When overriding OnItemDeleting(DetailsViewDeleteEventArgs) in a derived class, be sure to call the base class's OnItemDeleting(DetailsViewDeleteEventArgs) method so that registered delegates receive the event.

适用于

另请参阅