self ajax partial view in MVC3
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.
精彩评论