HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

Last post 07-03-2009 4:32 AM by rainynight. 14 replies.

Sort Posts:

  • HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-08-2006, 10:31 PM
    • Member
      534 point Member
    • purell
    • Member since 06-30-2006, 2:17 AM
    • Posts 205

    Code is below.  If you click on the image buttons back and forth back and forth.  You will eventually get error:  Input string was not in a correct format.

     <form id="form1" runat="server">

    <atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

    <div>

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" RenderMode="inline">

    <ContentTemplate>

    <table cellpadding="0" cellspacing="0" width="300">

    <asp:Repeater ID="rptMonth" runat="server">

    <ItemTemplate>

    <tr>

    <td width="200px" colspan="3" align="center">

    <asp:Label ID="lblMonth" runat="server" Text='<%# Container.DataItem %>' Visible="true"></asp:Label></td>

    <td width="10px">

    <asp:ImageButton ID="ibtnColor" runat="server" ImageAlign="AbsBottom" ImageUrl="~/collapse.jpg" />

    </td>

    </tr>

    </ItemTemplate>

    </asp:Repeater>

    </table>

    </ContentTemplate>

    </atlas:UpdatePanel>

    </div>

    </form>

     

    Dim interval As Integer = 4

    Dim arrMonths As ArrayList = New ArrayList

    For i As Integer = 0 To interval

    arrMonths.Add(i)

    Next

    arrMonths.Sort()

    rptMonth.DataSource = arrMonths

    rptMonth.DataBind()

  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 5:34 AM
    • Member
      157 point Member
    • Varangian
    • Member since 04-24-2006, 11:26 PM
    • Posts 66
    It never happened to me... how many times it should be clicked to get this error?
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 9:50 AM
    • Member
      534 point Member
    • purell
    • Member since 06-30-2006, 2:17 AM
    • Posts 205
    There is no count sometimes it's like 10 sometimes 20 sometimes 5 .... back and forth clicking on the different ones.  Very sporadic.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 9:53 AM
    • Member
      534 point Member
    • purell
    • Member since 06-30-2006, 2:17 AM
    • Posts 205
    You have to be using IE 6 or higher.  I tried it on 3 computers and it had the bug on every one.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 4:57 PM
    • Member
      700 point Member
    • SixString
    • Member since 08-04-2003, 10:06 PM
    • Posts 140

    The the strange thing to me is that this dosent happen in Firefox ...

    And its just almost in limit when your mouse cursor goes from arrow to hand

     Cheers

  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 5:07 PM
    • Contributor
      2,738 point Contributor
    • kashif
    • Member since 06-11-2002, 1:34 PM
    • Posts 547
    • AspNetTeam
      Moderator
    Can you wrap the databinding logic for the repeater in a !IsPostBack construct [add

    If (Not IsPostBack) Then

    ...

    End If

    around your code, it's not good coding practice to be binding on each post-back], by the way I couldn't reproduce the error using the code you provided above. It would be great if you could use the FiddlerTool and paste the actual output you received on the client when this error occured.

     Thanks, Kashif

  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 5:25 PM
    • Member
      700 point Member
    • SixString
    • Member since 08-04-2003, 10:06 PM
    • Posts 140

    Hi

     heres a image of what really happens when the button its not clicked right in the midlle "ImageClickError"

     

    cheers

  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 5:32 PM
    • Contributor
      2,738 point Contributor
    • kashif
    • Member since 06-11-2002, 1:34 PM
    • Posts 547
    • AspNetTeam
      Moderator
    Could you please use the fiddler tool, capture the trace when this error happens and post it to this thread? Thanks!
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 5:52 PM
    • Participant
      1,216 point Participant
    • Rasetti
    • Member since 04-17-2006, 10:40 PM
    • Auckland, New Zealand
    • Posts 286

    I'm experienging the same problem. There is another thread about it: http://forums.asp.net/thread/1457827.aspx

    And, I reproduced it again and here is the Fiddler trace:

    HTTP/1.1 200 OK
    Server: ASP.NET Development Server/8.0.0.0
    Date: Thu, 09 Nov 2006 22:43:40 GMT
    X-AspNet-Version: 2.0.50727
    Cache-Control: private
    Content-Type: text/html; charset=utf-8
    Content-Length: 55
    Connection: Close

    41|error|500|Input string was not in a correct format.|

    I don't know if this information is enough, I can post more Fiddler details and/or my code if needed.
    In the other thread I mentioned there is a proposed workaround.

    Cheers,

    Juan 

     

    Juan Barrera
    MCTS


    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 6:04 PM
    • Contributor
      2,738 point Contributor
    • kashif
    • Member since 06-11-2002, 1:34 PM
    • Posts 547
    • AspNetTeam
      Moderator
    I had initially mistaken it to be a parse error on the client and thus wanted to look at the server response. Seems like the error is happening on the server itself. Can you handle errors to redirect to a custom error page and log the stack trace of the exception [use Server.GetLastError() in Application_onError from global.asax] to see where exactly this error happens in the code - whether it is your code or framework code running on the stack when this error is encountered. Alternatively, you can debug to catch all exceptions and break into the error to see the code that is failing. Thanks!
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-09-2006, 6:58 PM
    • Participant
      1,216 point Participant
    • Rasetti
    • Member since 04-17-2006, 10:40 PM
    • Auckland, New Zealand
    • Posts 286

    kashif, I was tracing the error in the event log and catching exceptions, that's why I choose to "clear" the error (check the other thread), because I "know' that this specific error would hurt the application:
    I'd just like to remark that it only happens when you click over an image to trigger an async post back:
     

    Here is the trace for one of them:

    Event Type:    Error
    Event Source:    ASP.NET 2.0.50727.0
    Event Category:    None
    Event ID:    1078
    Date:        10/11/2006
    Time:        12:46:16
    User:        N/A
    Computer:    JUAN01
    Description:
    The state server has closed an expired TCP/IP connection. The IP address of the client is 127.0.0.1. The expired Read operation began at 11/10/2006 12:45:53.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

    And, here is the "cleaning" code:

    Code behind: 

       Protected Sub ScriptManager1_AsyncPostBackError(ByVal sender As Object, ByVal e As Microsoft.Web.UI.AsyncPostBackErrorEventArgs) Handles ScriptManager1.AsyncPostBackError
          If e.Exception.Message = "Input string was not in a correct format." Then
             Server.ClearError()
          Else
             ScriptManager1.AsyncPostBackErrorMessage = e.Exception.Message
          End If
       End Sub
     

    Page code:

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
                ScriptMode="Release" />

            <script type="text/javascript">
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args)
                {
                    if (args.get_error() != undefined && args.get_error().httpStatusCode == '500')
                    {
                    var errorMessage = args.get_error().message;
                    args.set_errorHandled(true);            
                    }
                }
            </script>

    I hope this helps,

    Juan
     

    Juan Barrera
    MCTS


    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-13-2006, 3:40 PM
    • Participant
      1,216 point Participant
    • Rasetti
    • Member since 04-17-2006, 10:40 PM
    • Auckland, New Zealand
    • Posts 286

    Kashif, sorry for asking, but it's useful what I posted?

    Thanks,

    Juan 

    Juan Barrera
    MCTS


    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-15-2006, 2:47 PM
    • Member
      534 point Member
    • purell
    • Member since 06-30-2006, 2:17 AM
    • Posts 205
    I HOPE they fix this problem in the next build.  Any place else I can post this bug?
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    11-15-2006, 6:31 PM
    • Participant
      1,216 point Participant
    • Rasetti
    • Member since 04-17-2006, 10:40 PM
    • Auckland, New Zealand
    • Posts 286
    Well...this forum seems to be "the" place :)
    Juan Barrera
    MCTS


    Please remember to click "Mark as Answer" on this post if it helped you.
  • Re: HUGE BUG ImageButton and Updatepanel - beta1 and beta2 - NEEDS FIX

    07-03-2009, 4:32 AM
    • Member
      9 point Member
    • rainynight
    • Member since 06-02-2006, 4:24 AM
    • Posts 3

    Hi friends

    I have the same problem with IE 8 and Anthem.NET ajax library

    Unfortunately i could not solve the problem with this solution but i have another solution for this problem :

    just use a LinkButton with Image control inside instead of ImageButton like this :

    <asp:LinkButton ID="btnRemove" runat="server" CommandArgument='<%# Eval("DemandID") %>' CommandName="delete"
    <asp:Image runat="server" ImageUrl="~/Icons/Small/remove.png" ID="imgDelete" />
    </asp:LinkButton>


Page 1 of 1 (15 items)