Routing in ASP .Net MVC

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

Routing is a pattern matching system which identifies the incoming request and decides what to do with that request. So the usual process will be carried out by this mechanism is that it maps the URL to a particular method (action) on a particular controller. The actions gets executed and returns an instance of ActionResult which handles the logic for rendering the HTML content in user's browser.

At run time the routing engine matches the incoming request URL pattern against the URL patterns defined in the Route table and process that accordingly.

Defining Route

A typical MVC project defines a 'Global.asax' file, which contains a single method 'Application_Start' within which various calls are made to various configuration methods to set up the application's working state. One of these calls is to the 'RegisterRoutes' method of the 'RouteConfig' class found in the 'App_Start' folder of the project which is responsible for configuring the routes for the application.




Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • In today's world of connecting mainframes ("Big Iron") to "Big Data" for advanced business analytics, mainframes are connected to mobile and Internet of Things (IoT) devices, clouds, and other open systems, and therefore subject to external attacks just like distributed systems. At the same time, mainframes are also subject to internal attacks such as employee's malicious intents or negligence. Read this eBook to learn how machine learning can help to secure mainframe systems and improve operational …

  • On-demand webcast Continuous integration and continuous deployment (CI/CD) allow DevOps teams to be more efficient. When starting from a production environment, the use of Microsoft SQL Server 2017 in Docker containers and Kubernetes clusters can facilitate a DevOps CI/CD pipeline. Using SQL Server tools also allows you to easily integrate core DevOps application lifecycle management practices to database development. Watch this on-demand presentation to learn how defining the database dependency as …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date