How to achieve a dynamic controller and action method in ASP.NET MVC?

前端 未结 3 1984
遇见更好的自我
遇见更好的自我 2020-12-02 14:26

In Asp.net MVC the url structure goes like

http://example.com/{controller}/{action}/{id}

For each \"controller\", say http://example.com/blog, there is a Bl

3条回答
  •  情深已故
    2020-12-02 15:21

    You need to write your own IControllerFactory (or perhaps derive from DefaultControllerFactory) and then register it with ControllerBuilder.

提交回复
热议问题