The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as:
http://example.com/items/search.xhtml?term=Text+to+find&page=2
Do you have to use a catch all parameter with a validation?
The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as:
http://example.com/items/search.xhtml?term=Text+to+find&page=2
Do you have to use a catch all parameter with a validation?
You can match querystring parameters with routes as well, if you want to just capture everything you need to add a parameter like so:
{*contentUrl}
Which will populate the rest of the url into that variable.
Any view data items that are not listed in the route are automatically mapped to the querystring, so if you map "items/search.xhtml" to an action:
Search(string term, int page)
Then you should get the results you are looking for.