开发者

ASP.NET MVC Actions + Extension

I want to have mvc action_name plus file extension in url like /Home/Index.aspx instead of /Home/I开发者_JS百科ndex; which route to Index action of Home Controller. Can anybody help me. Does anybody have any opinion or guideline?


routes.MapRoute(
                "RouteName",                                              // Route name
                "{controller}/{action}.aspx",                           // URL with parameters
                new { controller = "Home", action = "Index"}  // Parameter defaults
            );

Can you not do this

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜