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

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 01-06-2017, 03:45 AM   #1
chinmay.sahoo
Registered User
 
Join Date: Dec 2013
Location: Banglore
Posts: 334
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
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
chinmay.sahoo is offline   Reply With Quote

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

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.

Thanks
__________________
Sonvi Belani
Ecommerce Website Developer

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
sonvi.belani is offline   Reply With Quote
Reply


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
Asp.net project training in ahmedabad, live project training in Asp.net 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:37 AM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.