码迷,mamicode.com
首页 > Web开发 > 详细

【Asp.Net MVC】日常---路由

时间:2015-11-02 17:09:03      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:

想要这样的路由

不带id:http://test.mymong.com/Home/List.html

带id:http://test.mymong.com/Home/Del/561755ba3af24efa4fc09cef.html

           routes.MapRoute(
                name: "D",
                url: "{controller}/{action}/{id}.html",
                defaults: new { controller = "Home", action = "Index" }
         );
            routes.MapRoute(
             name: "E",
             url: "{controller}/{action}.html",
             defaults: new { controller = "Home", action = "Index" }
         );    

 

【Asp.Net MVC】日常---路由

标签:

原文地址:http://www.cnblogs.com/lb12081116/p/4930399.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!