This part of code:

<% foreach (Review r in ViewData.PreviousReviews)

{%>

<li><%=Html.RenderUserControl(“~/Views/MyContribution/PreviousReview.ascx”, r)%></li>

<%}%>

Generates multiple controls with SAME id property. It’s wrong in my opinion. So when you trying to access them from client script or server side code by getElementById() or FindControl() you will always hae access only to first one, because all other controls have the same identity!

So I need to use some additional syntax to fight this:

<% foreach (Review r in ViewData.PreviousReviews)

{%>

<li><%=Html.RenderUserControl(“~/Views/MyContribution/PreviousReview.ascx”, r, new {ID = “cr” + r.ReviewId})%></li>

<%}%>

In contrast in standard ASP.NET when we generates multiple controls (in repeater for example) without identities, they automatically receive different auto-generated id.