In a regular ASP.NET application, I have an httpModule where I handle the PreRequestHandlerExecute event and hook into the page's PreInit event so I can programatically set the masterpage. However, when the application is ASP.NET MVC, my httpModule no longer does what it's suppose to do because the CurrentHandler inside PreRequestHandlerExecute is of type System.Web.Mvc.MvcHandler rather than System.Web.UI.Page, so it's not so obvious to hook into the page's PreInit event.
My question: how do I modify my httpModule to programatically set the masterpage for an ASP.NET MVC view page? Is this even possible with an MvcHandler in the PreRequestHandlerExecute event?