Skip to end of metadata
Go to start of metadata

Redirection Notice

Icon
ASP.NET routing is responsible for mapping incoming browser requests to particular MVC controller actions. You can find more information about routing here. NopCommerce has an IRouteProvider interface which is used for route registration during application startup. All core routes are registered in the RouteProvider class located in the Nop.Web project.

public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(RouteCollection routes)
        {
            //home page
            routes.MapLocalizedRoute("HomePage",
                            "",
                            new { controller = "Home", action = "Index"},
                            new[] { "Nop.Web.Controllers" });

You can create as many RouteProvider classes as you need. For example, if your plugin has some custom routes which you want to register, then create a new class implementing the IRouteProvider interface and register the routes specific to your new plugin.

  • No labels