Blog Stats
  • Posts - 2
  • Articles - 1
  • Comments - 33
  • Trackbacks - 0

 

PostBack in ASP.Net showModalDialog

 

In my previous project i was using window.showModalDialog to open a modal window (ASPX Page) from parent ASPX page using JavaScript. But whenever the postback occurs in the modal window during <save > button click, it would spawn off a new window. When searching turned up my Colleagues with same problem who managed to work with window.open.Finally i found a solution which is very simple by just including below tag line in the <head> html of the modal window.

 <base target=_self>

I hope this would be helpful for someone with the same problem.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you. 6/20/2008 9:52 PM | rekha

# re: PostBack in ASP.Net showModalDialog

Gravatar I have been having this same problem for days now, continuing to try to re-code using cross postback configurations. But, I wanted a modal window! Thanks so much for this simple solution that works exactly the way I wanted it to work!! 7/19/2008 8:20 PM | Nell

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks Lot. Very Help ful to me. 8/10/2008 12:48 PM | Murali.M

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks. This worked great! 8/16/2008 7:44 AM | Gene

# re: PostBack in ASP.Net showModalDialog

Gravatar Perfect, thank you!! 9/6/2008 12:48 AM | Patrick

# re: PostBack in ASP.Net showModalDialog

Gravatar :) Thank you very much 10/22/2008 5:25 PM | Vaibhav Deshpande

# re: PostBack in ASP.Net showModalDialog

Gravatar Muchas gracias, excelente ayuda. Estuve buen tiempo con este problema. 11/4/2008 11:16 PM | J.Fernandez

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you so much! It saved me one day. 11/29/2008 10:22 PM | Jim

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks! Saved me hours of pain. ;) 12/3/2008 3:50 AM | Anthony

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks so much...Helped a lot... 12/17/2008 10:02 PM | Shiva

# re: PostBack in ASP.Net showModalDialog

Gravatar Great work ....helped me a lot 12/17/2008 10:03 PM | Shiva

# re: PostBack in ASP.Net showModalDialog

Gravatar thanks... I used the above suggested tag and it worked as per the expectation.
2/12/2009 11:49 AM | Deepti

# re: PostBack in ASP.Net showModalDialog

Gravatar It didn't work for me when I firstly, added this as ' <base target=_self> </base>'

but when i removed </base>........it's working fine with me.

Thanks a lot.........

regards
prem boyapati. 3/17/2009 2:12 PM | prem kumar

# re: PostBack in ASP.Net showModalDialog

Gravatar i know u got a lot of thanks already...
adding one more from my side - THANKS !!!! 4/6/2009 4:11 PM | Geo

# re: PostBack in ASP.Net showModalDialog

Gravatar adding another Thanks........:) 4/20/2009 6:09 PM | Mani

# re: PostBack in ASP.Net showModalDialog

Gravatar And another tnx! 4/22/2009 2:20 AM | Thatch

# re: PostBack in ASP.Net showModalDialog

Gravatar It's great. Thanks very much 6/8/2009 11:27 PM | Alexandr

# re: PostBack in ASP.Net showModalDialog

Gravatar Not working for me properly.

I have added like below
<title>xxxxxxx</title>
<base target="_self" />

Still it opens new window. Any idea 8/26/2009 2:06 PM | Ma

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks Rajesh, that was helpful 9/7/2009 10:36 AM | Peter

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you 11/11/2009 1:58 AM | skpananghat

# re: PostBack in ASP.Net showModalDialog

Gravatar thanks you. 12/23/2009 4:18 AM | quynh

# re: PostBack in ASP.Net showModalDialog

Gravatar You saved my sanity. 4/20/2010 11:58 AM | Dan

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks dude! 9/13/2010 11:57 PM | patman

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank u so much, this helped me a lot 9/23/2010 1:56 AM | Nazeel

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you! 2/14/2011 4:21 AM | Kevin

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you! 3/24/2011 1:58 AM | Enoch

# re: PostBack in ASP.Net showModalDialog

Gravatar Thank you! You are my life saver! 3/27/2011 7:53 PM | kenphan

# re: PostBack in ASP.Net showModalDialog

Gravatar Good. Thanks.

Can you please explain the piece of code? 7/4/2011 4:40 AM | Ali

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks. It saved me from changing lots of code. 7/12/2011 7:26 AM | Anurag Srivastava

# re: PostBack in ASP.Net showModalDialog

Gravatar Thanks a lot . this helped me 8/3/2011 5:54 PM | Venkat

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Rajesh Thomas