I have the routing as:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Demo", action = "Index", id = UrlParameter.Optional }
);
The routing works fine, but when I use a redirection as:
return RedirectToAction("Index", "Demo", new { data = "someData" });
The redirection works but the URL is displayed as
www.mydomain/applicationName/?data=somedata
and the form have the action as /applicationName/
The main issue is somewhere in the scripts, there are dynamic load of content where the URL is given as ../DirName/image.jpg
expecting there will me controller name present, which is also in use in other flows. Here I am getting a 404, as the URL that should have been
www.mydomain/applicationName/DirName/image.jpg
is showing
www.mydomain/DirName/image.jpg
Is there any easy workaround for this?