This post originated from an RSS feed registered with .NET Buzz
by Raymond Lewallen.
Original Post: Making modal dialog windows work in ASP.Net the easy way
Feed Title: Raymond Lewallen
Feed URL: /error.htm?aspxerrorpath=/blogs/raymond.lewallen/rss.aspx
Feed Description: Patterns and Practices, OOP, .Net and Sql
This is an old solution to an old problem, but since somebody asked
me if I knew how to solve this problem, I thought I'd post the solution
here to make it easier for people to find in the future.
The problem has to do with ASP.Net and modal windows. If you've ever
launched a modal window and issued a postback by clicking a button or
tried to redirect, you know that it always opens a brand new window,
and that is super annoying and unusable.
So, if you want to know how to use modal windows in Asp.Net and not
have them keep opening new windows, the solution (and I my friend will
can testify this simple solution works) does work. There are much more
elaborate solutions posted out on the internet, but trust me, its just
this easy, even though slightly inconvenient.
First, in the HEAD of EACH PAGE that will be as a modal window or called from a modal window, you have to have the following: