Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick ASP.NET routing question

How can I turn this /Home/About/ into just /About/ using the rules in the Global.aspx file?

like image 257
Cameron Avatar asked Dec 17 '22 16:12

Cameron


1 Answers

   public static void RegisterRoutes(RouteCollection routes)
    {
      routes.MapRoute(
          "About", // Route name
          "About", // URL
          new { controller = "Home", action = "About" });

      ...

    }

@Scott: Thanks. Fixed it.

like image 107
Serge Wautier Avatar answered Jan 03 '23 16:01

Serge Wautier