I'm having a problem trying to get the value of the ID item that has been clicked in an asp.net Repeater. My Repeater has an image that opens a dialog, and from that dialog opened, when I click Approve, I would like to get this value in the .cs file when I'm redirected because the ApproveChange_Click event. I'm not doing any DataBinder.Eval to the Id I want to retrieve in the Repeater. How can I accomplish that? If I use session variables, where I can set up the value in the .aspx page and how. Thanks in advance!
This is the Repeater:
<tr class="<%# Container.ItemIndex % 2 != 0 ? "" : "odd" %>">
<td class ="approval-img"><a class ="approvalDialog" href='#'><img src="/Images/Approve.png" alt ="Approve"/></td></a>
<td class ="approval-img"><a class ="declineDialog" href='#'><img src="/Images/Decline.png" alt ="Decline"/></td></a>
...
</tr>
And this the dialog:
<div id="approval-form" style="display: none; cursor: default">
<div class="approve-change">
<ul>
<li>
<p><label>Reason</label></p>
<textarea id="txtReason" runat="server" cols="1" rows="1" class="required"></textarea><br />
</li>
<li>
<span>
<asp:Button ID="btnApprove" runat="server" CssClass="blue" Text="Approve" ToolTip = "Approve" OnClick="ApproveChange_Click" />
<button id="btnCancelApprove" class="blue">Cancel</button>
</span>
</li>
</ul>
</div>
</div>