Opening modal window and getting return value in C#

W

WLF

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

wadefleming

So does no one know, or have I put this in the wrong newsgroup, or is
it a stupid question?
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top