Can implicit or session values be automatically added to the RouteValues in Url.Action() in ASP.NET MVC2? -


we've got ton of code written url written using code this:

url.action("index", "mycontroller", new {page=1}) 

our application multi-tenant application our user's log in database. means log-in process allows user select database want use session. did not build in beginning database name part of url. kept part of session.

now put database name in of our urls, way user can still create bookmarks browser url, , access specific page correctly without having select right matching database during login. essentially, nice if in asp.net mvc there way make above call this:

url.action("index", "mycontroller", new {page=1, clientname=identity.clientname}) 

without having go everywhere , mannually. we're talking several thousand places this..

is doable?

ok, assume can't done right now, , need write our own implementations of url.action, html.actionlink, , controller.redirect , global search , replace use our versions. bad.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -