| ||||||||
ButtonField.Text PropertySystem.Web.UI.WebControls Namespace ButtonField Class .NET Framework version 2.0 Sets or retrieves the text caption to display for the buttons in a ButtonField. Syntax
Property Value
The property is read/write with no default value. RemarksUse the Text property to specify or determine the text caption to display for each button in a ButtonField control.
Alternatively, the ButtonField can be set to display different button captions based on the values of a field in the data source bound to the parent control. To specify using a separate text caption for each button in the column, set the DataTextField property instead.
ExampleThe following example demonstrates how to use the Text property to specify the text caption for button controls in two ButtonField columns. Notice that all buttons in both columns will render the same text caption. <columns>
<asp:buttonfield text = "Add"
commandname = "AddToCart" />
<asp:buttonfield text = "Remove"
commandname = "RemoveFromCart" />
...
</columns>
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