Command::ItemCommand Event

 

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 the www.asp.net/mobile Web site.

Namespace:   System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

public:
event CommandEventHandler^ ItemCommand {
	void add(CommandEventHandler^ value);
	void remove(CommandEventHandler^ value);
}

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.

The following code example demonstrates how to use the ItemCommand event for multiple commands on a page.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: