Modal Dialog

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2ZXkgUA==?=, Jun 15, 2005.

  1. 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
    =?Utf-8?B?RGF2ZXkgUA==?=, Jun 15, 2005
    #1
    1. Advertising

  2. 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

    "Davey P" <> wrote in message
    news:...
    > 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
    Eliyahu Goldin, Jun 15, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leila
    Replies:
    0
    Views:
    406
    Leila
    Apr 26, 2005
  2. Matt
    Replies:
    1
    Views:
    3,141
    Whitecrest
    Jun 1, 2004
  3. Don
    Replies:
    0
    Views:
    350
  4. Matt
    Replies:
    0
    Views:
    218
  5. gopal srinivasan
    Replies:
    0
    Views:
    232
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page