1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using System.Web.Routing;
- namespace M55128_rec
- {
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapMvcAttributeRoutes();
- //routes.MapRoute(
- // name: "Action1Html", // action伪静态
- // url: "{controller}/{action}.html",// 带有参数的 URL
- // defaults: new { controller = "ZX", action = "Index", id = UrlParameter.Optional }
- //// 参数默认值
- //);
- // routes.MapRoute(
- // name: "index",
- // url: "{controller}/{action}/{id}",
- // defaults: new { controller = "KJ", action = "Index", id = UrlParameter.Optional },
- // namespaces: new[] { "M55128_rec.Controllers" }
- //).DataTokens.Add("area", "kj");
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "MainIndex", id = UrlParameter.Optional }
- );
-
- }
- }
- }
|