I’m developing an MVC 3 app
I want to have a url something like:
/some-product-name-goes-here-4726482648
(with 4726482648 being the product id)
I do have other pages such as:
/category-name
(allows browsing by category)
/about
etc…
How could I go about setting up routing to allow this?
You would certainly be using a RouteConstraint here
in your routes you could have something like this:
then in your ProductConstraint class you would have something as follows:
lastly in the Method signature of the Index action (or action in the route) take the string of the – and then split it down and process as appropriate
let me know if there are any issues
paul