By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,402 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,402 IT Pros & Developers. It's quick & easy.

Opening modal window and getting return value in C#

P: n/a
I have the following function (C# behind aspx page):

private void ButtonNewSupplier_Click(object sender, System.EventArgs
Response.Write("<script language=javascript>window.showModalDialog('"
+ Const.sPPAddSupplier +
"','_blank','left=50,top=50,toolbar=false,status=y es,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

Any help appreciated.
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply

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

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.