If I use a maproute like
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
The resulting url of Url.Action("","")
is like www.mysite.com/
which is base url of my site. but when I use the one with asterisk like
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{*id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
The resulting url of Url.Action("","")
is like www.mysite.com/Home/Index/
, but in second case I want to obtain www.mysite.com/
which is my base url. What should I do for that?