ASPNETMVC3_02_01 – Routing Basics
In a nutshell, the ASP.NET MVC3 engine allows developers to define a collection of Route objects. When a web request is passed from Internet Information Services to the ASP.NET MVC 3 engine, it matches up the URL of the web request with the collection of Route objects. Each Route object defines a rule, or a pattern to match against. Once the pattern has been matched for a given web request URL, the Route object alsdo defined which Controller Class and Action Method the request should be sent to in order to be handled. So, given a URL that looks like this, send it to this class and this method, or in other words, send it to this Controller and this Action.
The collection of route objects is referred to as a Route Map, it’s official name is a RouteCollection and it is configured in the Global.asax because in ASP.NET that is where these big picture types of activities happen. When you create a new ASP.NET MVC3 project, a default route is created — and in the previous videos we just used that route. In the next video we’ll start creating more route objects and will start to experience the power this provides us.
Just to solidify in our minds the connection between Controller Classes, Action Methods and Routes, we’ll experiment with an empty ASP.NET MVC 3 project and ferret out how routing works.
This is a short preview that demonstrates the quality of the screencasts we offer at LearnVisualStudio.NET.
Scroll down and click the play button in the lower-left hand corner of the video player to start watching.
The full length video is 12 Minutes, 16 Seconds and is available to LearnVisualStudio.NET members. Join today!
Bob, we love the videos – good presentation & pace. They’re a great way to help beginners get up to speed quickly.Mark Jewett , Senior Manager
SQL Server, Microsoft Corporation
1 Year Membership
$75per year
(it’s about $6 a month)
- Watch hundreds of screencasts
- New training each week
- Stream instantly via Vimeo … even works on iOS (and *some* Android devices)!
- Download source code
Lifetime Membership
$200pay just once
keep learning new .NET stuff
- 1 Year benefits, plus …
- Download video files to keep. Powered by Amazon S3 (blazing fast).
- Q & A Get answers to your questions about the videos
