Button Server Control

The Button control is used to submit the form back to the server(postback). This happens automatically in opposite to other controls where you have to enable the AutoPostBack property have the save effect. Buttons have a CauseValidation property to trigger validation of all validation controls assigned to the same group.
It is possible to use several buttons in a container control like a DataGrid or a GridView. All these buttons have the same ID and it will be impossible to bind an event handler to each button control's Onclick event(or other event) to determine the particular button that was clicked. That's why buttons have a CommandName and CommandArgument property to determine which button you clicked and deliver the correct argument to the event handler.

No comments:

Post a Comment