开发者

self ajax partial view in MVC3

开发者 https://www.devze.com 2023-04-11 13:53 出处:网络
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开发者_StackOverflow中文版 th

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开发者_StackOverflow中文版 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>


There is a similar question here.

In my case, I resolved it locating the target div out of the partial view.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号