Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ajax.Actionlink opens in a new page

I have a partial view that needs to get loaded between two div but when the ajax.actionlink is invoked it open the content in the partial view in a new browser window. I use UpdateTargetId = "ajaxReplace"

Regards

like image 621
RaVen Avatar asked Nov 30 '10 12:11

RaVen


1 Answers

Did you include/reference all the necessary javascript files?

You say you use MVC 3.

If you have UnobtrusiveJavaScriptEnabled then you'll need:

  • jQuery
  • jquery.unobtrusive-ajax.js

if you also use client side validation, you'll need;

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

These files can all be found when you create a new MVC3 project.

like image 146
Gideon Avatar answered Sep 25 '22 08:09

Gideon