当前位置:编程学习 > asp >>

Asp.net MVC 路由到Areas的三种方式

星期天最累了。。。
Controller
1 return RedirectToAction("action", "controller", new { area = "area-name" });
Page
1 <%= Html.ActionLink("display-value", "action", "controller", new { area = "area-name" }, null) %>
Routing
1             routes.MapRoute(
2                 "Default",
3                 "{controller}/{action}",
4                 new { area = "area-name", controller = "", action = "" }
5             );


呃,完咧

摘自  Yoer
补充:Web开发 , ASP.Net ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,