System.Web.UI.WebControls Namespace ButtonFieldBase Class
.NET Framework version 2.0
Sets or retrieves the type of button to render in the column.
Inline |
<asp:buttonfieldbase buttontype = enumValue ... > |
Script |
ButtonFieldBase.ButtonType = enumValue |
The property is read/write with a default value of Link.
Use the ButtonType property to specify or determine whether the buttons in a field that derives from the ButtonFieldBase class ( are displayed as link, push, or image buttons.
Clicking a button in a button field raises the command event of the parent data-bound control, for which you can respond to and perform some action by providing an event handler for the command event.
NOTE: The GridView control raises the RowCommand event, while the DetailsView control raises the ItemCommand event.
The following example demonstrates how to set the ButtonType property of a ButtonField at design time, and how to dynamically set the style properties of the buttons in the column at run time.
ButtonFieldBase Members Adding Button Fields to a GridView Control