Advertisement
gyrospring

✒ 0007.0015 VS2017 VB MVC5 Razor RouteConfig.vb

Apr 4th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Public Module RouteConfig
  2.  
  3.  
  4.  
  5.  
  6. Public Sub RegisterRoutes(ByVal routes As RouteCollection)
  7.  
  8.  
  9. routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
  10.  
  11. routes.MapRoute(
  12. "Machines",
  13. "machines/{IdIn}/{*PathIn}",
  14. New With {.controller = "Machines", .action = "Index", .IdIn = UrlParameter.Optional}
  15. )
  16. routes.MapRoute(
  17. name:="Home",
  18. url:="{IdIn}/{*PathIn}",
  19. defaults:=New With {.controller = "Home", .action = "Index", .IdIn = UrlParameter.Optional}
  20. )
  21.  
  22.  
  23. End Sub
  24.  
  25.  
  26.  
  27.  
  28. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement