NOTE: This page is still draft and not completed but you still can read it 

Source code for this POC at https://pocs.codeplex.com/SourceControl/latest#ASP.NET_Routing_Table/ 

If you worked on ASP MVC projects before you would know that the URLs that used on the web browser to browse this web application's pages not represent the actual structure of the physical pages files and directories but it maps different structure and maybe the page itself have no physical file on the web server file system.

Confused??

In the old days of web development you had to write a lot of pages which were text files contains HTML code have the extension .html and were saved on some directories that represent the hierarchy of your web site. By the time the web servers technologies and methodologies had been enhanced and dynamic pages is used to give a life to your website and make it interactive with the visitor and that made the revolution of the internet, however you had to make a physical pages for each dynamic page and web server will process it at the run time when it is requested by the client

In modern web development a lot of new requirement demands new technologies like how a web server can handle content management system in right and how it will handle the high availability and scalability of a web application.

To solve these questions you need to define a URL structure and a template HTML file or just a code that create the response for such kind of URL.

In case the a web server match your pattern with the requested URL. Web server will take the correct action and generate the right user response

Starting from .NET framework 3.5 and IIS 6, Microsoft add this functionality to ASP.NET. It mainly used with ASP.NET, but you can use it with ASP.NET web forms also.

In this prove of concept I will use ASP.NET forms and RoutingTable class to define URLs in a readable one and make the appropriate mapping to physical web forms

Walkthrough This Prove Of Concept

  1. Open Visual Studio and Create a new empty ASP.NET web application