DetailsView.OnItemInserting(DetailsViewInsertEventArgs) 方法

定义

引发 ItemInserting 事件。Raises the ItemInserting event.

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

参数

e
DetailsViewInsertEventArgs

包含事件数据的 DetailsViewInsertEventArgsA DetailsViewInsertEventArgs that contains the event data.

异常

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

注解

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

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

继承者说明

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

适用于

另请参阅