Skip to content

Instantly share code, notes, and snippets.

@victorighalo
Last active June 14, 2018 23:06
Show Gist options
  • Save victorighalo/8bb33d0fa45c48fdabf70f575ec88394 to your computer and use it in GitHub Desktop.
Save victorighalo/8bb33d0fa45c48fdabf70f575ec88394 to your computer and use it in GitHub Desktop.
Custom ASP.NET MVC Route
using System.Web.Routing;
using System.Web.Mvc;
namespace WyzWeb.Public.App_Code.RouteConfig
{
public class Routing : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapMvcAttributeRoutes();
routes.MapRoute(
"Name",
"name",
new { controller = "Base", action = "Name" }
);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment