ImageButton.CommandArgument Property
Assembly: System.Web (in system.web.dll)
[ThemeableAttribute(false)] [BindableAttribute(true)] public: virtual property String^ CommandArgument { String^ get () sealed; void set (String^ value) sealed; }
/** @property */ public final String get_CommandArgument () /** @property */ public final void set_CommandArgument (String value)
public final function get CommandArgument () : String public final function set CommandArgument (value : String)
Property Value
An optional argument that supplements the CommandName property.Sometimes, multiple ImageButton controls are related and share the same value for the CommandName property, such as Sort. Use this property to supplement the CommandName property with additional information about the command to perform, such as Ascending. The values of the CommandName and CommandArgument properties are typically used in the OnCommand event handler to determine the action to perform when the ImageButton control is clicked.
This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins Overview.
The following example demonstrates how to use the CommandArgument property to associate a command argument with an ImageButton control.
Note |
|---|
| The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model. |
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note