Chapter 16. Routing

This chapter covers

  • Routing as a solution to URL issues
  • Designing a URL schema
  • Using routing in ASP.NET MVC
  • Testing routes
  • Using routing in Web Forms applications

So far in this book, we’ve stuck with the default routing configuration that comes with any new ASP.NET MVC project. In this chapter, we’ll cover the routing system in depth and learn how to create custom routes for our applications.

Routing is all about the URL and how we use it as an external input to the applications we build. The URL has led a short but troubled life, and the HTTP URL is currently being tragically misused by current web technologies. As the web began to change from being a collection of hyperlinked static documents into dynamically created ...

Get ASP.NET MVC 2 in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.