Reputation: 3064
I have a set of questions each having several tags to it. Each tag is clickable and supposed to filter the questions based on it.
I have a Route for the tag:
new RouteDescriptor
{
Priority = -29,
Route = new Route(
"questions/tagged/{tag}",
new RouteValueDictionary {
{"area","xxx.Intrust"},
{"controller","Question"},
{"action","DisplayByTag"},
{"tag", ""}
},
new RouteValueDictionary {
{"tag",@"\w*/*"}
},
new RouteValueDictionary{
{"area","xxx.Intrust"}
},
new MvcRouteHandler())
},
A typical Tag url looks like this: http://local.intrustknowsbusiness.com/lendinng/questions/tagged/minimum%20opening%20deposit
But I am always getting 404 error.
I debugged the code, but no Action method in the controller (typically I like to see "DisplayByTag" is being invoked) is called.
What wrong I am doing? My other Routes are working fine and corresponding methods are also getting invoked as they should.
I am completely stuck. Please help!
Upvotes: 2
Views: 362
Reputation: 13366
Checklist:
IRouteProvider
) is in is enabledAnd btw - avoid having whitespaces (encoded as %20
) in paths. This can lead to lots of trouble. Better encode those as dashes etc.
Upvotes: 2