代码之家  ›  专栏  ›  技术社区  ›  CD..

ASP.NET MVC路由和InvokeActionMethod

  •  0
  • CD..  · 技术社区  · 15 年前

    ContentActionInvoker 这里面有一些疯狂的逻辑。

    在某些情况下,我希望在不同的控制器中使用不同的参数调用不同的操作。

    如何做到这一点?

    class ContentActionInvoker : ControllerActionInvoker
    {
            protected override ActionResult InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary<string, object> parameters)
            {
               ....
            }
    }
    
    3 回复  |  直到 15 年前
        1
  •  1
  •   Jeff Fritz    15 年前

    为什么需要通过Web服务器将用户体验重定向回(强制浏览器进行往返)以访问另一个类,该类与从MvcHandler接收请求的代码在同一AppDomain中运行?

        2
  •  0
  •   Kieran Senior    15 年前

    RedirectToAction("MyAction") ?

        3
  •  0
  •   griegs    15 年前

    你试过重新定向行动吗?还是我偏离了目标?