Popup dialog opens new window on postback
Popup dialog opens new window on postback
hi all,
many times we use popup dialogues opened with window.showmodaldialog(“samp.aspx“). but if there is postback happening on this window , you would see that this aspx opens in a new window.
i have a solution.. which is
add this to the head of your aspx
<head>
<title>Text</title>
<BASE target="_self">
.
.
</Head>
after adding you need to kill worker process rebuild and restart iis before you test this.
bcos iis always serves the cached version of the aspx as a popup.
Comments
Anonymous
October 25, 2007
PingBack from http://msdnrss.thecoderblogs.com/2007/10/25/popup-dialog-opens-new-window-on-postback-2/Anonymous
November 16, 2011
Awesome! You saved my day.Anonymous
June 07, 2013
What if the page you're calling is not under your control? (can't add <BASE target="_self"> )Anonymous
September 27, 2014
haaah! this saved a lot of time for me. Thanks a lot. :)