| ||||||||
ButtonField.CommandName PropertySystem.Web.UI.WebControls Namespace ButtonField Class .NET Framework version 2.0 Sets or retrieves the command to perform when a button in the ButtonField is clicked. Syntax
Property Value
The property is read/write with no default value. RemarksUse the CommandName property to specify or determine the command associated with a button control in a ButtonField. You can set the CommandName property to any valid string that identifies the command to perform when a button is clicked. You can then programmatically determine the command name from the CommandEventArgs of the parent data-bound control and perform the command appropriately.
ExampleThe following example demonstrates how to use the CommandName property to associate a command name with a button. The command name of the clicked button is then programmatically determined in the RowCommand event handler of the GridView control, and the appropriate action is performed.
See AlsoButtonField Members Adding Button Fields to a GridView Control |
| |||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme