共用方式為


DetailsView.OnItemDeleted(DetailsViewDeletedEventArgs) 方法

定義

引發 ItemDeleted 事件。

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 是由 DetailsView 控制項呼叫,以引發 ItemDeleted 事件。 擴充 類別時 DetailsView ,控制項開發人員通常會使用它。

OnItemDeleted 方法也允許衍生類別處理事件,而不用附加委派。 這是在衍生類別中處理事件的慣用技巧。

給繼承者的注意事項

當在衍生類別中覆寫 OnItemDeleted(DetailsViewDeletedEventArgs) 時,請確定呼叫基底類別的 OnItemDeleted(DetailsViewDeletedEventArgs) 方法,使已註冊的委派能接收到事件。

適用於

另請參閱