I have developed a very simple CMS. The main table is table Page, which has the columns: Id, ParentId, Title, PageHtml. ParentId is a relation to the Page table itself, so the user can create a naviagtion tree of Page's. I want to use MVC to use clean URL's en clean HTML!
I have made a PageController with only one View (Index.aspx). Index.aspx will be used to show the Page.PageHTML .
I want that the Page.Title is used in the URL, so for instance: www.mywebsite.com/PageTitle1/PageTitle1A.
In this example PageTitle1A is a Page which is related to the Page with title PageTitle1.
What is the best way to create the Routes in the RegisterRoutes method of Global.asax? Do I need to loop through my Page's and create routes for every Page.Title? Or is there another way?
View Complete Post