| |||||||
Introduction to the Button ControlsControls You Can Use on Web Forms ASP.NET Standard Controls Button Controls Buttons on a Web Forms page allow users to indicate that they are finished with the form or want to perform a specific command. Web server controls include three kinds of buttons that allow you to select buttons with different appearances. Types of ButtonsYou can create these types of Web server control buttons:
Button EventsAll three button types cause a form to be submitted when the user clicks them. This causes the page to be processed and any pending events to be raised in server-based code. The buttons can also raise their own Click events that you can write event-handling methods for. Buttons in Container ControlsButton Controls are often used in other controls, such as in the DataList control, DataGrid Control, and Repeater Control list controls. When they are, you generally respond to their events differently than when they were standing alone in a form. When users clicks a button in a container control, the event message is bubbled to the container control, where it raises a container-specific event. For example, in the DataList control, a button often raises the ItemCommand event ( rather than a Click event ) . Because the list Web server controls can contain many different buttons, you can specify an argument to pass along with the event when the event is bubbled to the container control. You can then test for this argument to see which button was clicked. Binding Data to the ControlYou can bind the ASP.NET server button controls to a data source in order to control their property settings dynamically. For example, you can set the button's Text property via data binding. |
| ||||||
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