Button Server Control

Button Server Control

It is One of the most common controls that has been used in the Web Forms as a Button server control. Buttons are used to submit forms.

The Button control is one of the easier controls to use. There are some important properties of Button Control.

The CausesValidation Property

CauseValidation property is used when you have more than one button on the web page and you are working with some validations but you want that validation will fire from one control only then set the cause validation property to false for the other control which you don’t want to fire the validation

The CommandName Property

You can have multiple buttons on your form all working from a single event. The nice thing is that you can also tag the buttons so that the code can make logical decisions based on which button on the form was clicked.