Advertisement
Ortund

Untitled

Sep 11th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1.     public class RouteConfig
  2.     {
  3.         public static void RegisterRoutes(RouteCollection routes)
  4.         {
  5.             routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  6.  
  7.             routes.MapRoute(
  8.                 name: "Default",
  9.                 url: "{controller}/{action}/{id}",
  10.                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  11.             );
  12.             routes.MapRoute(
  13.                 name: "Username",
  14.                 url: "{controller}/{action}/{user}"
  15.             );
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement