Opening modal window and getting return value in C#

Discussion in 'ASP .Net' started by WLF, Jan 11, 2005.

  1. WLF

    WLF Guest

    I have the following function (C# behind aspx page):

    private void ButtonNewSupplier_Click(object sender, System.EventArgs
    e)
    {
    Response.Write("<script language=javascript>window.showModalDialog('"
    + Const.sPPAddSupplier +
    "','_blank','left=50,top=50,toolbar=false,status=yes,directories=false,menubar=false,scrollbars=true,copyhistory=false,width=500,height=500');</script>");

    }

    which works OK, but I want to do some processing (refreshing Drop Down
    from databse to reflect new supplier) on the main form AFTER the modal
    window has been closed . Since showModalDialog has a return value I
    figure I could wait for that... however I don't know how to access the
    return value. Furthermore I could test the return value and if it was
    true(supplier succesfully added) I would do the refresh, and if false
    do nothing.

    I am open to using a normal (modeless) window, however since that
    would not have a return value I'm not sure how I'd approach the
    problem.

    Any help appreciated.
    WLF, Jan 11, 2005
    #1
    1. Advertising

  2. WLF

    Guest

    So does no one know, or have I put this in the wrong newsgroup, or is
    it a stupid question?
    , Jan 12, 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. Lee
    Replies:
    4
    Views:
    14,141
    Roland Hall
    Jul 29, 2004
  2. Matt
    Replies:
    1
    Views:
    3,137
    Whitecrest
    Jun 1, 2004
  3. Don
    Replies:
    0
    Views:
    348
  4. Matt
    Replies:
    0
    Views:
    217
  5. gopal srinivasan
    Replies:
    0
    Views:
    229
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page