Hi,
Thanks for response.
The button is in a gridview in a content placeholder. I have put a
code snippet below. As the buttons in a gridview, the delete button
will be repeated so I'm hoping to do a loop through of all buttons
with the 'delete' value...since they will all have different ids
dependant on the amount of rows in the grid.
-------------------------------
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div class="centre">
<asp:GridView ID="gvDevelopments" runat="server"
BackColor="White" OnSorting="gvUsers_Sorting"
BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
CellPadding="4" CssClass="tester"
DataKeyNames="ID" DataSourceID="SqlDataSource1" Font-
Names="Verdana" Font-Size="Small" AllowSorting="True"
AutoGenerateColumns="False" ForeColor="Black" GridLines="Vertical">
<FooterStyle BackColor="#CCCC99" />
<Columns>
<asp:TemplateField >
<ItemTemplate >
<asp:Button ID="ButtonDelete" runat="Server"
CommandName="Delete" Font-Size="8pt"
Text="Delete" Width="45px" />
</ItemTemplate>
<ItemStyle VerticalAlign="Top" />
</asp:TemplateField>
Hi,
What for, you are thinking to iterate through delete buttons ?
So that you can delete that particular record ? What for you need ID
of that delete button.
If that is only for deleting record, then you can use the
RowCommand event for writing the delete code. Other wise you may
iterate through all the buttons on the form itself. But this is a very
untidy logic.
Just post me the actual requirement in complete details, so
that I may help you furthure.
Thanks,
coolCoder