I have a Microsoft MVC project with an action "Foo" whose view ("Foo.aspx") contains the lines:
<%= Html.ActionLink("mylinktext1", "bar") %>
<%= Html.ActionLink<MyController>(x => x.Bar(), "mylinktext2") %>
When I hit this from a web browser or load it from an AJAX call, it properly returns:
<a href="/bar">mylinktext1</a>
<a href="/Bar">mylinktext2</a>
But when I call the action from another view like this:
<% Html.RenderAction<MyController>(x => x.Foo()); %>
Then the links are rendered without targets.
<a href="">mylinktext1</a>
<a href="">mylinktext2</a>
Why would this be happening, and how do I work around it?