I’ve been creating a blog, which contains of 3 diffrent views.
– Overview
– Post Detail
– Filtered overview
The filtered overview is based on blogposts which contain a certain tag, to make the url pretty I would love to get it like to be able to add optional parameters like the following:
mydomain.com/blog/<tagname>/<page>
mydomain.com/blog/<tagname1>/<tagname2>/<page>
mydomain.com/blog/<tagname1>/<tagname2>/<tagname3>/<page>
The pageing parameter is semi-optional, if not there it should be 1. But in most cases it will be there.
Are there ways to solve this issue in a nice way?
The only way I could think of was creating a lot of lines in my global asax which makes it kind of messy in my opinion.
Thanks in advance, DerDee
You could write a custom route:
which will be registered in
Global.asax:and then you could have a BlogController: