0

I have two divs, one containing a navigation menu and one the main body.

The navigation menu contains links that look like this:

<div class="LeftNavigationItem">@Ajax.ActionLink("Test", "SelectCity", "Location", new AjaxOptions {UpdateTargetId="MainBody"})</div>

The target view returned by Location/SelectCity controller is rendered into MainBody but the javascript in it is not. Replacing the above ActionLink with Html.ActionLink fixes it.

For reference the SelectCity/Location returns a simple view with some at the top and a bunch of HTML. Only the HTML makes it.

Is there a fix for this, or a better way to do navigation without refreshing the navigation static div?

2
  • Did you forget to link jquery.unobtrusive-ajax.js in your view? Commented Jul 31, 2013 at 2:18
  • Thanks but it's already there: <script src="/Scripts/jquery.unobtrusive-ajax.js" type="text/javascript"></script> Commented Jul 31, 2013 at 5:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.