How to solve: Ajax.ActionLink shows partial view on entire page

If you trying to update the partial view with Ajax.ActionLink and instead of reloading the partial view within the view, it loads on entire web page or overwrites the view with the partial view’s content. Than you need to check the following things in your View and Partial View.

1. In the View, Check the AjaxOptions for the Ajax.ActionLink. It must include the UpdateTargetId property that should be correct.
 
2. Verify in the view, there should not be present any other DOM element with the same id. For example: Some time developer put the DIV element with the same id attribute in the view and partial view.
 
3. Verify that scripts are loading correctly. Sometime old jQuery and Ajax libraries cause this issue.
 
4. Check whether you have add the reference of jquery.unobtrusive-ajax.js or not. If have not found than include this script bundle also.

If you are still facing same problem, please let me know.

One thought on “How to solve: Ajax.ActionLink shows partial view on entire page”

Comments are closed.