System.Web.UI.HtmlControls Namespace HtmlInputButton Class
Sets or retrieves a value indicating whether validation is performed when the HtmlInputButton control is clicked.
Script |
HtmlInputButton.CausesValidation [ = true | false ] |
This property can only be used programmatically; it cannot be set when declaring the control.
This property accepts or returns only a boolean value: true if validation is performed when the HtmlInputButton control is clicked; otherwise, false.
This property is read/write with a default value of true.
By default, page validation is performed when an HtmlInputButton control is clicked. Page validation determines whether the input controls associated with a validation control on the page all pass the validation rules specified by the validation control.
You can specify or determine whether validation is performed on both the client and the server when an HtmlInputButton control is clicked by using the CausesValidation property. To prevent validation from being performed, set the CausesValidation property to false.
This property is commonly used in the handler for the ServerClick event to prevent page validation from occurring when a Cancel or Reset button is clicked.
HtmlInputButton Members