I’ve recently been looking into the areas functionality for my application and had partial success transferring code into my first area.
My question involves linking from inside an area to a location that isn’t in an area. I’ve read the tutorial on how to link from one area to another, but while I still have code that isn’t within an area how do I link to it?
<a href="@Url.Action("Index","Home", new )"> <span>Testing Link </span> </a>
How do I make this code, which currently links to /myarea/home/index instead link to /home/index (not in an area). If this is against best practices I’d be interesting in reading about it, I’m still learning ASP.NET’s version of Areas
The
RouteValuescollection can take an area parameter. Just make it blank.new { area = "" }