Your popup window needs to be a complete HTML document, so you shouldn't be using a user control for this. You won't use your master page of course, but just a plain MVC View Page. You'll need a controller & action to point to this. Let's say you have a link
that you want to popup a window to show your privacy policy... The link: The script to wire up the popup behavior (jquery): $("a.popup").click( function(link) { window.open(a.href, "", "width=400; height=500; toolbar=no; menubar=no"); return false; }); and
the controller: public class HomeController : Controller { ...more actions public ActionResult Privacy() { return View(); } } then create a regular aspx view (no master page) that contains the privacy policy. By doing it this way your users that have javascript
disabled will still make it to the content, it just won't happen in a popup. If you have javascript, you get the better functionality.
subdigital
Contributor
2105 Points
445 Posts
ASPInsiders
Re: Open a ascx control popup window the MVC way?
Feb 02, 2009 05:59 PM|LINK
http://www.flux88.com
ASP.NET MVP
Certified ScrumMaster
ASPInsider
MCSD