Performing logic on parent page, based on actions performed on ModalDialog
I have a pretty stand开发者_运维知识库ard page which calls a ModalDialog.
The modal dialog is a simple form which contains two buttons. Each button contains specific logic it performs then closes the dialog form on button click.
What I'd like to do is set something on each button click, whether its as simple as x = 1 for button 1 and y=2 for button 2, that can be accessed and used to perform logic on the calling page.
I know I can have a return value from the ModalDialog - however this is only returned to the Javascript which calls the ModalDialog, correct? Short of creating some global value across the entire project, I'm not sure how to approach this - and I'd rather not do that.
you may make a property of dialog to keep the selected logic type. On the Page you can check this property.
精彩评论