You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
848 B

2 years ago
  1. using System.Web.Mvc;
  2. using System.Web.Routing;
  3. namespace WebApp
  4. {
  5. public static class RouteConfig
  6. {
  7. public static void RegisterRoutes(RouteCollection routes)
  8. {
  9. routes.IgnoreRoute("{directory}/{resource}.asmx/{*pathInfo}");
  10. routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  11. routes.MapRoute(
  12. name: "Default",
  13. url: "{controller}/{action}/{para1}/{para2}/{para3}/{para4}",
  14. defaults: new
  15. {
  16. controller = "Login",
  17. action = "Index",
  18. para1 = UrlParameter.Optional,
  19. para2 = UrlParameter.Optional,
  20. para3 = UrlParameter.Optional,
  21. para4 = UrlParameter.Optional
  22. }
  23. );
  24. }
  25. }
  26. }