help please on GridView commands + AutoEventWireUp, firing twice etc...

C

Charm Lor

Does anyone have an update on this issue? I'm running into the same
thing. Random multiple POSTs causing duplicate charges/credits for
clients. Subsequent POSTs are sent when the first POST receives a 200 0
64 response. Users swear they did not click the Submit button twice.
 
M

manuel0081

This bug has been forwarded to Microsoft.
This is the answer from Microsoft Bug adn reported issues:

Thanks for reporting the issue. This is a known issue and we are
investigating fixing this in the next service pack. For the time being
you could use the following work around. One obvious workaround is to
change the button type to a regular button or a link button. If you need
an ImageButton, then you can put an ImageButton in a TemplateField. You
may need to handle the Command event on the ImageButton and call
DeleteRow, passing the RowIndex as the CommandArgument, like this:

<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton runat=server id="ImageButton1" CommandName="Delete"
ImageUrl="..." CommandArgument='<%# DataBinder.Eval(Container,
"RowIndex") %>' OnCommand="ImageButton1_Command" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

protected void ImageButton1_Command(object sender, CommandEventArgs e) {
GridView1.DeleteRow(Int32.Parse(e.CommandArgument.ToString()));
}

Thanks,
The Web Platform and Tools Team


You can find discussion in the site in the previous post or to
http://forum.aspitalia.com/forum/post/259149/GridviewImagebutton.aspx


Ema
 
J

JHirsch

Another request for microsoft to provide an official reply. I can verify
the exact behavior describe and add the following. This occurs only in
IE (v. 6 and v. 7). Additionally it occurs on both IIS5 and IIS6, as
well as the local Cassini server.
 
S

Steven Cheng[MSFT]

Hello JHirsch,

Is the Gridview command issue you mentioned here means the double postback
behavior of ImageButton in GridView command field? So far, there is only an
existing issue of this. You can have a look at the following newsgroup
thread to see whether the problem you met is exact the one there:

http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webc
ontrols/browse_thread/thread/a9a1bd53c27bd8b0/82c51830597e5fc8

Also, for this issue, there is already a public bug entry on the product
feedback center(also recorded in internal bug database):

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac
kid=105123

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello JHirsch,

Is the bug entry I posted in last message the one meet your scenario?
Please feel free to let me know if there is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top