Using Postbacks in ASP.NET From showModalDialog pages.#

If you have an ASP.NET page (.aspx) opened with the JavaScript showModalDialog() function and inside that page there is a form doing PostBack, when the PostBack is being done the page loads in another (popup) window. The easiest way to prevent this is to add the following tag inside the <HEAD></HEAD> tags of the ASP.NET page:

<base target="_self">

From: http://www.geekpedia.com/Question23_Using-showModalDialog()-with-an-ASP.NET-page-that-does-PostBack-opens-another-window.html

Categories:  |  | 
Thursday, August 24, 2006 1:52:59 PM (Central Standard Time, UTC-06:00) #    Comments [1]  | 

 

Saturday, October 28, 2006 4:56:14 PM (Central Standard Time, UTC-06:00)
That's embarassing. I ran into this issue a few years back and, as I recall, worked around it by relaying the page through an iFrame - and that got baked into a library I've been using since. That works, of course, but it's a bit kludgy compared to this simple work around. Thanks for posting.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

All content © 2008, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 1.9.6264.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: