The Dialog triggers the ClientSideOnClose event when the Dialog control is closed programmatically or the “X” icon in the control is clicked to close the Dialog box window. That is, the event is triggered after closing the Dialog control. You can handle the client side functionalities by using the ClientSideOnClose event in the script side.
The following scenario updates the NumericTextBox value in the web page based on the value entered in the Dialog box by using the ClientSideOnClose event. Also a Button is displayed to reopen the dialog that is hidden on creation.
Refer to the following code example.
Define the Dialog close event in the client side script to perform the required action.
The following screenshots illustrate the output for the above scenario.
Figure 1: Click the close icon (X) with some value entered in the NumericTextBox
Figure 2: Close event is handled in client side script to update the value of NumericTextBox and a button to reopen the Dialog box
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
|5098||06/01/2015||06/01/2015||ASP.NET Web Forms||Dialog|