Ti ho detto che funzionaaaaaaa!![]()
codice:<asp:GridView ID="GridView1" runat="server" EnableViewState="false" AutoGenerateColumns="true" AutoGenerateDeleteButton="true" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting"> <Columns> <asp:CommandField ButtonType="Image" ShowDeleteButton="true" DeleteImageUrl="../../../../immagini/cancella.gif" /> <%-- <asp:CommandField ButtonType="Image" ShowEditButton="True" ShowDeleteButton="True" ItemStyle-HorizontalAlign="Center" HeaderText="OPZIONI" EditImageUrl="~/IMG/edit.png" DeleteImageUrl="~/IMG/delete.png" CancelImageUrl="~/IMG/annulla.png" UpdateImageUrl="~/IMG/aggiorna.png" /> --%> </Columns> </asp:GridView>
Dim imgb As ImageButton = DirectCast(e.Row.Cells(1).Controls(0), ImageButton)
imgb.Attributes.Add("onclick", "if (!confirm('Sei sicuro di voler cancellare questo record?') ) {return false;}")

Rispondi quotando