开发者

Custom RouteMap

Hi I have to route an old path, that was containing the old webform, to my new controller.

I tried this:

            routes.MapRoute(
            "DownloadLink",
            "products/pippo/download/{*catchall}",
            new { controller = "Downloads", action = "Index"} 
            );

To have my controller called with http://mysite.com/p开发者_开发知识库roducts/pippo/download/ but what I receive it's a 404 Status Code, what am I doing wrong?

Thanks in advance


Put the DownloadLink route registration before all the other routes registrations in your Global.asax RegisterRoutes method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜