Command.OnItemCommand(CommandEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.