Command.ItemCommand Event
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.
Occurs when the user selects a command that is associated with an ObjectList item. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public:
event System::Web::UI::WebControls::CommandEventHandler ^ ItemCommand;
public event System.Web.UI.WebControls.CommandEventHandler ItemCommand;
member this.ItemCommand : System.Web.UI.WebControls.CommandEventHandler
Public Custom Event ItemCommand As CommandEventHandler
Event Type
Remarks
When an ItemCommand event handler is defined, the Command control notifies the handler when an item event is generated through user interaction.
Unlike the Click event, the ItemCommand event is bubbled up to the parent controls. The ItemCommand event rendering is device-specific and is discussed in detail in the "Device-Specific Behavior" section of System.Web.UI.MobileControls.Command.
The OnItemCommand event is raised after an OnClick event. In a scenario where you repeat the same set of actions each time a command button is clicked, you can use either the CommandName or CommandArgument property of the Command control to identify which command button the user clicked.