Modal Dialog

G

Guest

I am able to open a modal dialog on a button click from the code behind by
placing a RegisterClientScriptBlock() method in the button click event
handler. This all works fine, but the problem is that when the modal box is
displayed, the parent page in the background goes blank until the dialog has
closed and returned.
I have to do it this way as there is a lot of server side processing needed
to get the arguments to pass into the dialog args, otherwise I would do it
all client side using html buttons. Is there any way to get the parent to
postpone posting back until the modal has shut?

Thanks
 
E

Eliyahu Goldin

You call showModalDialog before the page has finished loading. That's why it
stays black. I suggest you to call showModalDialog in body's onload event.
This would be your scenario:
1. User clicks the button on the parent.
2. Server-side OnClick event calculates the parameters for the dialog and
puts them in hidden input controls.
3. Client-side onload event gets the parameters from the hidden inputs and
calls showModalDialog.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top