asp.net.ph

HtmlInputButton.CausesValidation Property

System.Web.UI.HtmlControls Namespace   HtmlInputButton Class


Sets or retrieves a value indicating whether validation is performed when the HtmlInputButton control is clicked.

Syntax


Script HtmlInputButton.CausesValidation [ = true | false ]

This property can only be used programmatically; it cannot be set when declaring the control.

Property Value

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.

Remarks

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.

Example


See Also

HtmlInputButton Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 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 asp.net.ph