asp.net mvc的partialview @ Ajax.ActionLink不起作用 [英] asp.net mvc partialview @Ajax.ActionLink doesn't work
本文介绍了asp.net mvc的partialview @ Ajax.ActionLink不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个观点页
我的看法页
<div id="beReplaced">
@Ajax.ActionLink("please click on me to bring the partial view",
"PatrialViewToBeCalled",
new AjaxOptions()
{UpdateTargetId = "beReplaced",
InsertionMode = InsertionMode.InsertAfter,
HttpMethod="Get",
LoadingElementId = "prgress" })
</div>
我有一个控制器
public PartialViewResult PatrialViewToBeCalled()
{
var customer = db.Customers.First();
return PartialView("PartialViewThatMustBeShow",customer);
}
但是当我产生的点击它带给我一个新的页面,而不是
替换或追加div标签的局部视图。
but when i click on the generated link it brings me to a new page instead of replacing or appending the partial view to the div tag.
什么问题?
推荐答案
我找到了解决办法。这个问题是由于损坏的不显眼-ajax.min.js文件。
I found the solution. The problem was due to the corrupted unobtrusive-ajax.min.js file.
这篇关于asp.net mvc的partialview @ Ajax.ActionLink不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文