[RESOLVED]Routing by title name

Instead of my content coming back by ID (/Home/Index/1), I want my pages to be named after the title of the page (/Home/Index/this-is-the-page-title). How would I accomplish this using ASP.NET routing? Is routing the correct method for this?

no routing changes required. its just:

   ActionResult Index (string id) { …}

and id will equal "this-is-page-title". you will probably need to convert the title to the numeric id.

Leave a Reply