Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string originalPath = Request.Path;
     HttpContext.Current.RewritePath(Request.ApplicationPath, false);
     IHttpHandler httpHandler = new System.Web.Mvc.MvcHttpHandler();
     httpHandler.ProcessRequest(HttpContext.Current);
     HttpContext.Current.RewritePath(originalPath, false);
 }
Exemplo n.º 2
0
    public static void Transfer(ActionExecutingContext filterContext, string url)
    {
        // Rewrite path
        HttpContext.Current.RewritePath(GetPath(filterContext, url), false);

        IHttpHandler httpHandler = new System.Web.Mvc.MvcHttpHandler();

        // Process request
        httpHandler.ProcessRequest(HttpContext.Current);
        filterContext.HttpContext.Response.End();
    }