title: use Repeater Item index in Hidden Field
body: <p>How to set Item index in a Repeater Column with Hidden Fields in asp.net.<br>
  I wrote the following code but it does not show the index value in hidden field.</p>
  
  <pre><code>&lt;ItemTemplate&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;asp:HiddenField ID="HiddenField1" runat="server" Value='&lt;%# Container.ItemIndex+1 %&gt;' /&gt;
              &lt;%--&lt;asp:HiddenField ID="hfIndex" runat="server" Value='&lt;%#Container.ItemIndex+1 %&gt;' /&gt;--%&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label ID="lblExpenseGLCode" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem, "ACM_ACCOUNT_CODE")%&gt;'&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;asp:Label ID="lblAccountGLDescription" runat="server" Text='&lt;%# DataBinder.Eval(Container.DataItem, "ACM_ACCOUNT_DESC")%&gt;'&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>