title: How to passing Repeater Row ID to javascript/jquery and change image
body: <p>What I'm trying to do is:</p>
  
  <p>I have a table (repeater) that shows me the various sessions. In each session I can calculate your expenses. For this I have the linkButton <strong>lnkGenerate</strong>.
  After expenses are generated automatically changes the image, and becomes <strong>lnkDelete</strong>. (this is done in ascx.cs)</p>
  
  <pre><code>&lt;asp:Repeater ID="rpt1" runat="server" EnableViewState="false" OnItemCommand="rpt1_ItemCommand"&gt;
      &lt;HeaderTemplate&gt;
          &lt;table cellpadding="4" cellspacing="0" width="100%"&gt;
              &lt;tr style="color: Black; white-space: nowrap;"&gt;
                  &lt;th style="width: 90%"&gt;
                      Session
                  &lt;/th&gt;
                  &lt;th style="width: 10%;"&gt;
                      Session Value
                  &lt;/th&gt;
                  &lt;th style="white-space: nowrap;"&gt;
                  &lt;/th&gt;
              &lt;/tr&gt;
      &lt;/HeaderTemplate&gt;
  
      &lt;ItemTemplate&gt;
          &lt;tr id="row" runat="server"&gt;
              &lt;td align="left" style="white-space: nowrap"&gt;
                      &lt;%# ((Session)Container.DataItem).Name %&gt;
              &lt;/td&gt;
              &lt;td align="center"&gt;
                  &lt;%# ((Session)Container.DataItem).ValueSession &gt; 0 ? ((Session)Container.DataItem).ValueSession.ToString() : "-" %&gt;
              &lt;/td&gt;
              &lt;td style="white-space: nowrap;"&gt;
                  &lt;asp:LinkButton ID="lnkGenerate" runat="server" ToolTip="Generate" CausesValidation="false" OnClientClick="showImg(this);"
                      CommandName="generate" Visible='&lt;%# ((Session)Container.DataItem).ValueSession == 0 &amp;&amp; !this.IsBlock %&gt;'&gt;
                      &lt;asp:Image ID="imgGenerate" runat="server" ToolTip="Generate" SkinID="imgGenerateAuto" /&gt;
                  &lt;/asp:LinkButton&gt;
                  &lt;asp:LinkButton ID="lnkDelete" runat="server" ToolTip="Delete" CausesValidation="false"
                      CommandName="delete" Visible='&lt;%# ((Session)Container.DataItem).ValueSession &gt; 0 &amp;&amp; !this.IsBlock %&gt;'&gt;
                      &lt;asp:Image ID="imgDelete" runat="server" ToolTip="Delete" SkinID="imgDeleteAuto" /&gt;
                  &lt;/asp:LinkButton&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/ItemTemplate&gt;
      &lt;FooterTemplate&gt;
          &lt;/table&gt;
      &lt;/FooterTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>What i want is:</p>
  
  <p>Clicking on the image to generate the costs, it changes to an image of "<strong>loading</strong>" and then they are calculated, go to <strong>lnkDelete</strong>.
  I've tried using javascript, however, each line has a specific ID can not I get.</p>
  
  <p>Suggestions?</p>