title: ASP.NET Repeater Control Checkbox issue
body: <p>Overview: Clicking on <em>text</em> of first CheckBox in a repeater control clicks the <em>last one</em>. I know why this is happening; association of <code>label</code> tag with element id <code>chkMarkedForDeletion</code> and when that label is clicked it selects the last CheckBox, as all the CheckBoxes have same ID.. damn you repeater control!! I am wondering if there is any way to avoid this? Easy way would be to create individual labels and associate correctly to each CheckBox but that defeats the supposed default behaviour of a CheckBox.</p>
  
  <p>Repeater code:</p>
  
  <pre><code>&lt;asp:Repeater ID="childNodesDataRepeater" runat="server"&gt;
      &lt;ItemTemplate&gt;
          &lt;table style="width: 100%;" cellpadding="0" cellspacing="0" border="0"&gt;
              &lt;tr&gt;
                  &lt;td style="width: 200px;"&gt;
                      &lt;asp:CheckBox ID="chkMarkedForDeletion" runat="server" EnableViewState="true" Text="Remove"
                          Checked='&lt;%# DataBinder.Eval(Container.DataItem, "IsMarkedForDeletion") %&gt;' /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &amp;nbsp;
                  &lt;/td&gt;
                  &lt;td style="width: 200px;"&gt;
                      &lt;asp:CheckBox ID="chkHighImpactCause" runat="server" EnableViewState="true" Text="High Impact Cause"
                          Checked='&lt;%# DataBinder.Eval(Container.DataItem, "IsHighPriority") %&gt;' /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td colspan="3"&gt;
                      &lt;asp:Label ID="header002" runat="server" Text="What caused this problem?" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td colspan="3"&gt;
                      &lt;asp:TextBox ID="txtProblemCausedBy" runat="server" EnableViewState="true" Width="100%"
                          Text='&lt;%# DataBinder.Eval(Container.DataItem, "Description") %&gt;' /&gt;&lt;br /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td colspan="3" style="height: 5px;"&gt;
                      &lt;hr /&gt;
                      &lt;asp:HiddenField ID="nodeIdentifier" runat="server" EnableViewState="true" Value='&lt;%# DataBinder.Eval(Container.DataItem, "AnalysisID") %&gt;' /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>Generated HTML Code for CheckBox:</p>
  
  <pre><code>&lt;INPUT id=chkMarkedForDeletion type=checkbox name=TabContainer$tabProblemResolution$frmProblemResolution1$childNodesDataRepeater$ctl00$chkMarkedForDeletion&gt;
  &lt;LABEL for=chkMarkedForDeletion&gt;Remove&lt;/LABEL&gt;
  ...
  ...
  &lt;INPUT id=chkMarkedForDeletion type=checkbox name=TabContainer$tabProblemResolution$frmProblemResolution1$childNodesDataRepeater$ctl02$chkMarkedForDeletion&gt;
  &lt;LABEL for=chkMarkedForDeletion&gt;Remove&lt;/LABEL&gt;
  </code></pre>
  
  <p>Issue:
  <img src="https://i.stack.imgur.com/z7AVt.png" alt="Repeater Issue ScreenShot"></p>
  
  <p>Thanks,
  Abhi</p>