Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > ASP


Thread Tools Rate Thread Display Modes
Old 01-06-2017, 03:45 AM   #1
Registered User
Join Date: Dec 2013
Location: Banglore
Posts: 336
Send a message via AIM to chinmay.sahoo Send a message via MSN to chinmay.sahoo
Arrow How is a route table created in ASP.NET MVC?

When an MVC application first starts, the Application_Start() method in global.asax is called. This method calls the RegisterRoutes() method. The RegisterRoutes() method creates the route table for the MVC application.

Fat Cutter Powder | Asthi jivak | Fat Cutter
chinmay.sahoo is offline   Reply With Quote

Old 03-16-2017, 12:16 AM   #2
Registered User
Join Date: Jan 2017
Location: Ahmedabad
Posts: 126

The RouteTable is a class that stores the URL routes for your application.A RouteCollection provides a collection of route information to be used when mapping a URI to a controller action.The RouteTable contains a property called Routes that will return a RouteCollection. The RouteTable uses a RouteCollection in order to store all the URL routing information it needs to accurately direct URI's to the correct controller action.In your global.asax you will register the routes that will map to various controller actions.

protected void Application_Start()
{RegisterRoutes(RouteTable.Routes); }

Then a route will be added to the RouteCollection in the following way:///
/// Registers the routes used by the application. ///
/// Routes to register.

public static void RegisterRoutes(RouteCollection routes)
routes.MapRoute("Error", "Error", new { controller = "Error", action = "Error" });
This shows how the actual route information is stored in a RouteCollection, which in turn is referenced via the RouteTable.

Sonvi Belani
Ecommerce Website Developer
custom software companies India
ASP.NET software companies India
sonvi.belani is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is impersonation in ASP.NET? chinmay.sahoo Programming General 3 06-20-2016 06:07 AM
TrainerBot presents the new generation of table tennis robot! bolhaw General Discussion 0 05-23-2016 12:22 PM
Difference between ASP.NET WebForms and ASP.NET MVC sivakumar1 ASP 0 07-26-2015 10:38 PM project training in ahmedabad, live project training in ahmedabad anantitsolution Post your ad here 1 07-16-2013 07:42 PM
statistics from mysql table ncjbhd PHP / mySQL 0 10-27-2011 01:24 AM

All times are GMT -7. The time now is 02:02 PM.

Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.