首先我用MVC4新增一个订单查看的功能1.创建控制器OrderControllernamespace MvcApplication3.Controllers{ public class OrderController : Controller { public Acti ...
让我们接下来一步步分析
首先我们看MVC路由类RouteCollection的扩展方法 MapRoute 的参数属性
// // 摘要: // Maps the specified URL route and sets default route values and namespaces. // // 参数: // routes: // A collection of routes for the application. // // name: // The name of the route to map. // // url: // The URL pattern for the route. // // defaults: // An object that contains default route values. // // namespaces: // A set of namespaces for the application. // // 返回结果: // A reference to the mapped route. // // 异常: // System.ArgumentNullException: // The routes or url parameter is null. public static Route MapRoute(this RouteCollection routes, get='_blank'>string name, string url, object defaults, string[] namespaces);
原标题:MVC路由配置为何如此麻烦
关键词:mvc
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。