Ajax.Actionlink opens on a new page

I have a partial view that needs to be loaded between two divs, but when ajax.actionlink is called, it opens the contents in partial view in a new browser window. I am using UpdateTargetId = "ajaxReplace"

Hi

+7
asp.net-mvc asp.net-ajax
source share
2 answers

Have you included / specified all the necessary javascript files?

You say you are using MVC 3.

If you have UnobtrusiveJavaScriptEnabled , you will need:

  • JQuery
  • jquery.unobtrusive-ajax.js

if you also use client side validation you will need

  • jquery.validate.js
  • jquery.validate.unobtrusive.js

These files can be found when creating a new MVC3 project.

+11
source share
 [OutputCache(Duration=0)] 

according to the controller method. I had this with AJAX.ActionResult, which worked well in FF, but not in IE8. IE8 should send back some things that allow the caching mechanism to simply return a value.

+1
source share

All Articles