ASP.NET MVC 2 Point Return Links to Appropriate View -
ASP.NET MVC 2 Point Return Links to Appropriate View -
the default scaffolded views generated asp.net mvc 2 contain links such as:
<%: html.actionlink("back list", "index") %> <%: html.actionlink("create new", "create") %>
these links perfect if came page same root. example, if have orders , persons , navigate /orders/edit/17
via /persons/orders/3
, 'back list' returns me orders root not persons root, want go, because 'edit orders' view knows orders. makes navigation awkward , breaks flow..
i want reuse same 'edit orders' view regardless of came from, i'm not sure how pass information.
i know it's possible pass parameters /orders/edit/17?myparam=myvalue
limit choices later on if need pass parameters indicate sort/filter order grids?
what preferred way pass return/origin location view can render links properly? otherwise, how can phone call view differently controller?
edit:
for clean solution, see this post
passing in parameters through querystring not limit long don't utilize same names. there size restriction on querystrings, you'll not nail it.
that's how it. i'm curious see others answer.
model-view-controller asp.net-mvc-2 asp.net-mvc-routing asp.net-routing
Comments
Post a Comment