ASP.NET - programmatically generated delete button
Posted
by WedTM
on Stack Overflow
See other posts from Stack Overflow
or by WedTM
Published on 2010-04-17T18:48:41Z
Indexed on
2010/04/17
18:53 UTC
Read the original article
Hit count: 197
I'm trying to create a simple button that deletes a row from the database. I would like to set the ID of the control to something like delete_MATERIALID_button
however, when I do this:
<asp:Button ID='delete_<%# Eval("MatID") %>_button' runat="server" Text="Delete" />
I get an error that the name can't be generated like that.
I know that there must be a simple solution, I just can't figure it out.
© Stack Overflow or respective owner