routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
routes.MapRoute(
name: "Article",
url: "index.html",
defaults: new { action = "Index", controller = "home", htmlname = UrlParameter.Optional },
constraints: new { action = "Index" }
);
routes.MapLocalizedRoute("Product",
"{SeName}",
new { controller = "Product", action = "ProductDetails" },
new[] {"YunMFramework.Web.Controllers"});
routes.MapLocalizedRoute("GetSampleDownload",
"download/sample/{type}/{id}",
new { controller = "Download", action = "Sample" },
new { type=@"\d+",id = @"\d+" },
new[] { "YunMFramework.Web.Controllers" });
本站文章除注明转载外,均为本站原创或翻译,欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,共创和谐网络环境。
转载请注明:文章转载自:华晨软件-云微开发平台 » 框架中MVC路由该怎么配置
本文标题:框架中MVC路由该怎么配置
本文地址:https://www.hocode.com/QAPrefecture/0001.html