开发者

Route controller to Foo/{Action}

开发者 https://www.devze.com 2022-12-13 16:47 出处:网络
I开发者_如何学C was wondering if there is some easy way to route an entire controller to something like:

I开发者_如何学C was wondering if there is some easy way to route an entire controller to something like:

Foo/{Action}?

or do I have to write a route for every action in that controller?

/M


Not totally sure what you want todo, but how about:

            routes.MapRoute(
            "FooMap",
            "Foo/{action}",
            new { controller = "Foo"})
0

精彩评论

暂无评论...
验证码 换一张
取 消