RouteConfig.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using System.Web.Routing;
  7. namespace NEducation
  8. {
  9. public class RouteConfig
  10. {
  11. public static void RegisterRoutes(RouteCollection routes)
  12. {
  13. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  14. routes.MapRoute(
  15. name: "Default",
  16. url: "{controller}/{action}/{id}",
  17. defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  18. );
  19. // routes.MapRoute(
  20. // name: "LocalizedDefault",
  21. // url: "{lang}/{controller}/{action}",
  22. // defaults: new { controller = "Home", action = "Index" },
  23. // constraints: new { lang = "fr-FR|vi-VN" }
  24. //);
  25. // routes.MapRoute(
  26. // name: "Default",
  27. // url: "{controller}/{action}",
  28. // defaults: new { controller = "Home", action = "Index", lang = "fr-FR" }
  29. // );
  30. }
  31. }
  32. }