can anybody solve my probelm in asp.net using c#.
i am creating button inside while loop at runtime in html page.i just want to give different ID for different button inside while loop.how can i do that. any suggestion?any id but it should be unique.
here is my code.
Expand|Select|Wrap|Line Numbers
- <table style="z-index: 112; left: 24px; width: 653px; position: absolute; top: 72px;height: 344px" border="1">
- <%
- while (rdr.Read())
- {
- %>
- <tr height="5">
- <td style="width: 261px; height: 6px"><% Response.Write(rdr["comment"].ToString());%></td>
- <td style="width: 261px; height: 6px"><% Response.Write(rdr["comment"].ToString());%></td>
- <td style="width: 261px; height: 6px">
- <% Response.Write(rdr["comment"].ToString());%><br />
- <asp:Button ID="button2" runat="server" Width="153px" Height="24px" Text="Reply"></asp:Button></td>
- </tr>
- <%
- }
- %>
- </table>