why query strings asp.net mvc route?
on an asp.net mvc (beta) site i am building infrequently calls actionlink relapse me urls containing querying strings. i have removed resources furnish behavior, nonetheless i still know why, instead producing purify url, decides controlling query twine parameter. i know functionally same, nonetheless conformity (and appearance) urls i want.
here routes:
routes.maproute(
"photo gallery shortcut",
"group/{groupname}",
new { controller = "photos", movement = "all", id = "" });
routes.maproute(
"tagged photos", //since tagged movement takes an additional parameter, put first
"group/{groupname}/photos/tagged/{tagname}/{sortby}",
new { controller = "photos", movement = "tagged", id = "", sortby = "" });
routes.maproute(
"photo gallery", //since gallery's defualt movement "all" "index" the listed seperatly
"group/{groupname}/photos/{action}/{sortby}",
new { controller = "photos", movement = "all", id = "", sortby = "" });
routes.maproute(
"group", //<-- "group" problem tangible above
"group/{groupname}/{controller}/{action}/{id}",
new {controller = "photos", movement = "index", id = ""});
now problem wholly occurs i am looking during perspective described lane named "tagged photos" govern actionlink via:
html.actionlink<photoscontroller>(p => p.all((string)viewdata["group"], ""), "home")
which produces url:
http://domain/group/groupname?sortby=
from any perspective url assembled is:
http://domain/group/groupname
i have pulled down phil's , all appears order. me stumped. any ideas?
Comments
Post a Comment