Ale*_*ndr 3 .net asp.net asp.net-mvc asp.net-mvc-routing
如何定义链接到默认操作的路由.
例如,
/Customer/acme-company
/Client/bill-johnson
Run Code Online (Sandbox Code Playgroud)
一直在寻找方法获取控制器客户端和客户.
使用参数默认值.
routes.MapRoute(
"MyRoute", // Route name
"{controller}/{someParameter}", // URL with parameters
new { controller = "Home", action = "Get" } // Parameter defaults
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2461 次 |
| 最近记录: |