I'm using a repeater to show the rows in a data table. I'd like the
have a link button beside each row that removes the record, firing a
client script function to prompt the user for confirmation, and then
run as a server control. I know how to attach client script to a
server control, but I'm not sure how to access the control of the
repeater item. Code follows:
<ItemTemplate>
<tr class="font8v">
<td><%# DataBinder.Eval(Container.DataItem, "FileName")
%></td>
<td><%# DataBinder.Eval(Container.DataItem, "Size"))%></td>
<td><asp:LinkButton id="btnOne" runat="server" Text="Remove"
CommandArgument='<%#DataBinder.Eval
Container.DataItem,"FileName")%>' ></asp:LinkButton>
</td>
</tr>
</ItemTemplate>
To add client script to a button, I'd do the following:
btnOne.Attributes.Add("onclick", "javascript:confirmRemove")
How do I programmatically do this to the repeater Item?
Thanks in advance for any help!!