title: Set div id dyanmically in each item in the loop to be referred in Ajax.ActionLink method?
body: <p>Do we have better ways to handle it?</p>
  
  
  
  <pre><code>@foreach (var item in Model)
  {
      &lt;div id="divDetail@{@item.CategoryId}"/&gt;
          @Ajax.ActionLink(
              item.CategoryName, 
              "GetDetails", 
              new { id = item.CategoryId }, 
              new AjaxOptions() { UpdateTargetId = string.Format("divDetail{0}", item.CategoryId) })
         }
      &lt;/div&gt;
  }
  </code></pre>