View. On Item Deleted(DetailsViewDeletedEventArgs) 方法
protected: virtual void OnItemDeleted(System::Web::UI::WebControls::DetailsViewDeletedEventArgs ^ e);
protected virtual void OnItemDeleted (System.Web.UI.WebControls.DetailsViewDeletedEventArgs e);
abstract member OnItemDeleted : System.Web.UI.WebControls.DetailsViewDeletedEventArgs -> unit override this.OnItemDeleted : System.Web.UI.WebControls.DetailsViewDeletedEventArgs -> unit
Protected Overridable Sub OnItemDeleted (e As DetailsViewDeletedEventArgs)
此OnItemDeleted方法ItemDeleted由控件调用以引发事件。 DetailsViewThe OnItemDeleted method is called by the DetailsView control to raise the ItemDeleted event. 在扩展DetailsView类时, 控件开发人员通常会使用此方法。It is generally used by control developers when extending the DetailsView class.
OnItemDeleted 方法还允许派生类对事件进行处理而不必附加委托。The OnItemDeleted 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.
在派生类中重写 OnItemDeleted(DetailsViewDeletedEventArgs) 时，一定要调用基类的 OnItemDeleted(DetailsViewDeletedEventArgs) 方法，以便已注册的委托对事件进行接收。When overriding OnItemDeleted(DetailsViewDeletedEventArgs) in a derived class, be sure to call the base class's OnItemDeleted(DetailsViewDeletedEventArgs) method so that registered delegates receive the event.