I'm trying to extract some simple code into a separate helper function
@helper ShowPath()
{
<p class="migas">
<a href="@Url.Action("Index", "Home")">Home</a>
> <a href="@Url.Action("Index", "AboutUs")">About Us</a>
> Directory</p>
}
Works fine within the original cshtml file but the @Url.Action causes a compile error when I extract it to a separate file that I put within the App_Code folder.
Do I need to pass in a HTMLHelper from the calling page? If so, any ideas how?