Command.OnItemCommand(CommandEventArgs) Method

Definition

Called when the user activates the control. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

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

Parameters

e
CommandEventArgs

An CommandEventArgs object that contains event data.

Remarks

The default implementation raises the ItemCommand event. Inheriting classes can override this method to perform other tasks.

The OnItemCommand event is raised after the OnClick event. This is useful when you must take the same actions for multiple Command buttons. You can use the CommandName or CommandArgument property of the Command control to identify which Command button was clicked.

Applies to

See also