7
Reply

Where is RouteTable stored in MVC?

Sreeni Dony

Sreeni Dony

9y
4.1k
0
Reply

    RouteTable is a collection of routes that is stored in RouteConfig.cs file in App_Start folder of the application.

    When a MVC application first starts, the application _start() method is called. This method in turn calls RegisterRoutes() method which creates Route table.

    When a MVC application first starts, the application _start() method is called. This method in turn calls RegisterRoutes() method which creates Route table.

    It can be stored in RouteConfig.cs as well as in Global.asax file to define the route of the request URLs to call the particular controller.

    RouteTable provides route for MVC application. public static void RegisterRoutes(RouteCollection routes) {routes.MapRoute("Default", // Route name"{controller}/{action}/{id}", // Route Patternnew { controller = "Home", action = "Index", id = UrlParameter.Optional } // Default values for above defined parameters); }protected void Application_Start() {RegisterRoutes(RouteTable.Routes);//To:DO }

    Route Table store on IIS

    http://dotnet-munesh.blogspot.in/2015/05/create-first-aspnet-mvc-application.html