| |||||
HtmlButton Control SyntaxASP.NET Syntax ASP.NET Syntax for HTML Controls Specifies a container for rich HTML that is rendered as a button. For information on the individual members of this class, see HtmlButton in the class library. Syntax Notes
Working with HtmlButtonThe HtmlButton server control renders as an HTML 4.0 <button>. This differs from <input type=button> in that it enables web developers to create rich UI form buttons that can be composed from embedded HTML elements ( and even other server controls ). The HtmlButton control enables programming of the HTML <button> element. You can use this control to customize the appearance of the buttons you place in .aspx pages. The HTML 4.0 <button> element enables you to create UI form buttons composed from embedded HTML elements and even other Web Forms controls. The following sample illustrates use of the HtmlButton control. There are a number of ways to modify the appearance of an HtmlButton control. You can assign style attributes to the button in the opening tag of the control element, include formatting elements around the text that you insert between the opening and closing tags of the control, or assign property value changes for the client-side To add styles to an HtmlButton control
<button runat="server"> </button>.
style = "font: 8pt verdana; background-color:lightgreen; border-color:black; height=30; width:100" To include DHTML events in an HtmlButton control
<button runat="server"> </button>.
onmouseover = "this.style.backgroundColor='yellow'" To include formatted text, images, or other controls in an HtmlButton
The following example shows use of the concepts presented above, and also how to include code that is assigned to handle the
See AlsoWeb Forms Events and Handlers HtmlButton Class |
| ||||
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