Ajax.Actionlink在新页面中打开 [英] Ajax.Actionlink opens in a new page
本文介绍了Ajax.Actionlink在新页面中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个需要文件中加载两个分区之间得到一个局部视图但当ajax.actionlink调用它在一个新的浏览器窗口中打开的局部视图的内容。我用UpdateTargetId =ajaxReplace
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"
问候
推荐答案
是否包含/引用所有必需的JavaScript文件?
Did you include/reference all the necessary javascript files?
您说您使用MVC 3。
You say you use MVC 3.
如果您有 UnobtrusiveJavaScriptEnabled
那么你需要:
- 的jQuery
- jquery.unobtrusive-ajax.js
如果您还使用客户端验证,你需要;
if you also use client side validation, you'll need;
- jquery.validate.js
- jquery.validate.unobtrusive.js
这些文件可以当你创建一个新的MVC3项目全部找到。
These files can all be found when you create a new MVC3 project.
这篇关于Ajax.Actionlink在新页面中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文