Conditions: Gridview CommandField with a column for the removal, with the option ButtonType = "Image". In some cases, the event "RowDeleting" runs two times in a row, creating many problems.
fact, if there is a gridview in single row, double execution to an error rate; but if there are 2 or more rows, they will be deleted 2 per click. The bug, acknowledged by Microsoft, currently does not have an official fix, probably will be corrected in a future service pack. b) instead of TemplateField column CommandField use a column in this way
\u0026lt;asp:TemplateField>
\u0026lt;ItemTemplate>
\u0026lt;asp: ImageButton ID = "ImageButton1" runat = "server" CausesValidation = "False" CommandName = "Delete"
ImageUrl = "~ / admin / images / delete.gif" AlternateText = "Delete" OnClientClick = "return confirm ('Remove from Cart')" />
\u0026lt;/ ItemTemplate>\u0026lt; / asp: TemplateField>
0 comments:
Post a Comment