MVC3 中的 self ajax 部分视图
我在 ID 为“评级”的 div 中有部分视图。所以我在同一个局部视图中有一个 ajax 链接。因此,当我单击链接时,它会更新一次,如果我第二次单击链接,它会加载 div 两次,单击三次会加载多次。
有人有同样的问题吗?
<div class="rating">
@Ajax.ActionLink("Flag this review as inappropriate", "CourseRatingFlag", "Content", new { cID = Model.courseRatings[index].crid}, new AjaxOptions() { HttpMethod = "POST",TargetId="rating" })
some content...
</div>
I have a partial view inside a div with id 'rating'. So I have a ajax link inside the same partial view. So when I click on the link its updating one time and if i click the link second time, its loading the div two times and clicking three times load multiple times.
Anybody have the same issue?
<div class="rating">
@Ajax.ActionLink("Flag this review as inappropriate", "CourseRatingFlag", "Content", new { cID = Model.courseRatings[index].crid}, new AjaxOptions() { HttpMethod = "POST",TargetId="rating" })
some content...
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个类似的问题这里。
就我而言,我解决了将目标 div 从部分视图中定位出来的问题。
There is a similar question here.
In my case, I resolved it locating the target div out of the partial view.