ASPxSiteMapControlBase.NodeCommand Event
Fires when a control contained within a templated node raises the Command event.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Event Data
The NodeCommand event's data class is SiteMapNodeCommandEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
CommandArgument | Gets the argument for the command. Inherited from CommandEventArgs. |
CommandName | Gets the name of the command. Inherited from CommandEventArgs. |
CommandSource | Gets an object representing the control which forced a postback. |
SiteMapNode | Gets a node object related to the event. |
Remarks
A site map control allows the contents of its nodes to be customized through defining templates. A template of a node can be specified by the ASPxSiteMapControlBase.NodeTemplate or LevelProperties.NodeTemplate property. A template is a set of HTML elements and controls which constitute a layout for a particular site map node.
The NodeCommand event is fired when any control contained within a templated node raises the Command event. The NodeCommand event is commonly used when a specific command name is associated with a button control. This allows you to create multiple button controls within different templated nodes and programmatically determine which button control is clicked.
Write an NodeCommand event handler to perform specific actions each time the Command event is raised by any control contained within any templated site map node. The NodeCommand event provides a parameter of the SiteMapNodeCommandEventArgs type.