DetailsView.OnItemUpdating(DetailsViewUpdateEventArgs) 方法

定义

引发 ItemUpdating 事件。Raises the ItemUpdating event.

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

参数

e
DetailsViewUpdateEventArgs

一个包含事件数据的 DetailsViewUpdateEventArgsA DetailsViewUpdateEventArgs that contains the event data.

异常

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

注解

DetailsView 控件调用 OnItemUpdating 方法来引发 ItemUpdating 事件。The OnItemUpdating method is called by the DetailsView control to raise the ItemUpdating event. 它通常由控件开发人员在扩展 DetailsView 类时使用。It is generally used by control developers when extending the DetailsView class.

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

继承者说明

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

适用于

另请参阅