asp.net mvc 4 - get subdirectory relative URL from relative URL -
we have mvc4 application,
there navigation panel @ left side of screen , navigation tree built dynamically along additional parameters.
so store navigation url in column in table (say /dataset/financial).
now when application hosted on subdirectory(say http://localhost/xyzabcd/) url generated dynamically table still targets root(ie., http://localhost/dataset/financial).
i got know url.action() solve problem.
now since has been designed that, know if there standard way can qualified url relative url(so don't have make change in db)? there built-in or existing method doing this?
if add scheme/protocol, should give fqdn you're looking for.
example
url.action("action", "controller", new { routedata = 1}, "http") note, routedata put in placeholder. set null if desired. also, "http" "https"
Comments
Post a Comment