Table of Contents
CancelButton Property

Gets or sets the ID of a button on the content or footer area of a dialog that can be used to close the dialog and set the return result of the dialog.

Syntax
 public String CancelButton { get; set; }
Remarks

When user clicks the cancel button, the dialog will be closed and the button's CommandName property will be set as the return result of the dialog, which can be retrieved by using the dialog's client API.

The ID assigned to this property must be either a LinkButton, ImageButton or Button that is on content or footer area of the current dialog.

If user clicks the close button located on a dialog's header area's top right corner, the dialog will be closed and this CancelButton's CommandName property will be set as the dialog's return result.

Client script can use this return result to know how the user closes the dialog.

See Also