C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
7
Reply
What is routing in MVC?
Chinmaya Dash
9y
6.4k
3
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
to work with url and effective navigation between pages is called routing
Manav Pandya
7y
2
Routing is a mechanism in MVC that decides which action method of a controller class to execute. Without routing there's no way an action method can be mapped. to a request. Routing is a part of the MVC architecture so ASP.NET MVC supports routing by default.
Ritesh Singh
8y
2
Basically, Routing is a pattern matching system that monitors the incoming request and figures out what to do with that request. At runtime, Routing engine uses the Route table for matching the incoming request's URL pattern against the URL patterns defined in the Route table.
Dhrutika Rathod
7y
1
Routing helps you to define a URL structure and map the URL with the controller.For instance let’s say we want that when a user types “http://localhost/View/ViewCustomer/”, it goes to the “Customer” Controller and invokes the DisplayCustomer action. This is defined by adding an entry in to the routes collection using the maproute function. Below is the underlined code which shows how the URL structure and mapping with controller and action is defined.routes.MapRoute("View", // Route name"View/ViewCustomer/{id}", // URL with parametersnew { controller = "Customer", action = "DisplayCustomer", id = UrlParameter.Optional }); // Parameter defaults
Chinmaya Dash
9y
1
Routing is a mechanism in MVC that decides which action method of a controller class to execute. Without routing there's no way an action method can be mapped. to a request. Routing is a part of the MVC architecture so ASP.NET MVC supports routing by default
Dhaval Patel
7y
0
for asp.net mvc routing is a path selection mechanism which is written in RouteConfig.cs class file which is present inside the application.Its main task is to create the route table which is invoked when a http request comes into the scenario and call the action method of the desired controller.
Rajan Mishra
7y
0
ASP.NET introduced Routing to eliminate needs of mapping each URL with a physical file. Routing enable us to define URL pattern that maps to the request handler. Routing is URL pattern matching technique which manages incoming request and based on controller name and action method name it maps to URL and executes action method.
Jignesh Kumar
7y
0
What is the difference between “HTML.TextBox” vs “HTML.TextBoxFor”?
How to reduce image resolution in C#?
Message