Is there anyway that I can exclude an ID field from the generated URL, but still be able to use the ID value? If you take a StackOverflow URL:
http://stackoverflow.com/questions/3409196/asp-net-mvc-routing-question
Can that URL be rendered without the Question ID?
You can display the question without an ID but question title has to be unique for every question.
Also you can still use the IDs for finding questions then redirect to another URL that only displays the question title. If that’s how you wanna do it I can post an example.
Here’s an example:
You also have to define a route for this to work
Add this route just before the default route. It may mess things if you have routes for URL starting with http://domain.com/questions.
Note: This may not be the best solution. If your question titles are not unique, you can’t put links with this structure in your page. First it has to look for question using ID.