I'm a little stumped at the moment; I'm using the new routing engine for the
first time and I'm having trouble getting the UrlHelper to play nice.
Traditionally I've been passing the parameter "querystring='key=value'" but
this doesn't seem to work with the routing engine when generating URLs. The
routing engine docs instead indicate that the format "params={key=value}"
but this seems to result in nothing appearing at all.
My route is registered using:
RoutingModuleEx.Engine.Add(new PatternRoute("/<controller>/<id>/view.ashx")
.DefaultForAction().Is("view")
.Restrict("id").ValidInteger
);
I try to generate links for this using...
$Url.Link(MyUser, "%{controller='user', action='view', params={id=10}}")
...and this ends up generating the URL "/user/view.ashx" - no id parameter
anywhere. If, on the other hand, I use the querystring like so:
$Url.Link(MyUser, "%{controller='user', action='view',
querystring='id=10'}")
...I end up with "/user/view.ashx?id=10".
What am I doing wrong?
Cheers,
Symon.
Symon Rottem
http://blog.symbiotic-development.com
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.