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

  • Whether you're wondering if the title of "developer" should have your name next to it or you've just started on the path to software success, consider this guide your personal README.md file. (And if that reference didn't make sense to you, read on. It will soon, grasshopper.) This software developer resource guide explores just how in-demand developers are and the growing gap of qualified individuals needed, discusses the many benefits and perks of being a developer, and enlightens you on the myriad of …

  • Analytics in the cloud democratize the ability of developers and non-technical business users alike to put ever-expanding data universes to work. Download this eBook to learn how to plan and build a cloud-based enterprise analytics platform, tune that environment to meet changing business requirements, and maximize the TCO benefits of moving analytics to the cloud.

Most Popular Programming Stories

More for Developers

RSS Feeds

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