4.0 and IE10 - Click on imagebutton in updatepanel produces error, click on normal button does not! - by p_sie

Status : 


Sign in
to vote
ID 755419 Comments
Status Active Workarounds
Type Bug Repros 35
Opened 7/25/2012 1:41:23 AM
Access Restriction Public


Because Windows 8 is coming out in a few months, I thought I would see how my web applications will work under Windows 8 and IE10
A problem has come to surface, that when I place a listview in an updatepanel and I use imagebuttons as the buttons (to select, undo etc.) then a click on a imagebutton in an Item of the listview gives a runtime error.
For testing purpeses I created a very simple listview inside an updatepanel.
In the InsertItemTemplate I added a button and a Imagebutton, same with the Cancel commandname:
 <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" /> 
<asp:ImageButton imageurl="~/images/undo.png" ID="ImageButton1" runat="server" CommandName="Cancel" /> 
A click on the Button works like it should... A click on the ImageButton gives an error. In the eventlog on the server the following error
 is saved:
Exception message: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection)
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
When I use IE10 in compatibility mode, it works OK
 Anyone any clue why this is and how to correct the error (and I don't want to switch to the Big buttons inside my listview items, cause they take to much space!)
Hope to hear from anyone...

P.S. same bug in .net 3.5 when viewing the site in IE10!
Sign in to post a comment.
Posted by Jose Geraldo on 9/20/2013 at 1:42 PM

Eu tive este problema numa aplicação 4.0 - utilizando o ajaxcontrol toolkit 3.5.
A versão do Ajax é AjaxControlToolkit 3030930
Ainda bem que eu tinha os fontes da versão.
Alterei o código fonte do AjaxControlToolkit 3030930, gerei nova DLL, removi a antiga do projeto,
referenciei a nova DLL, testei e funcionou legal.

Nos fontes do ajaxcontroltoolkit, aberta a solução no visual stuido 2010, CTRL Shift F
        return new Sys.UI.Point(

encontrei e acrescentei as linhas abaixo

        if (typeof offsetX === "number") {
            offsetX = Math.round(offsetX);

        if (typeof offsetY === "number") {
            offsetY = Math.round(offsetY);

     return new Sys.UI.Point(offsetX, offsetY);

conforme a solução apontada aqui por Hemendra Shah.

Muito obrigado ai Hemendra.
Posted by Matt [MSFT] on 6/16/2013 at 9:50 PM
Thanks for your feedback. Recently we released several GDRs for IE related bugs. You may want to have a try on these patches.

.Net 4.0

.Net 2.0
Posted by HorsetoothBrian on 5/21/2013 at 12:30 PM
I replicated this issues as well. Installing 4.5 on the server fixed this, but it is still broken in 4.0.
Posted by Renato Mattos on 5/13/2013 at 2:56 PM
Any solution to the problem? Because for me to change planning framework without other bugs may appear.
The suggestion metatage X-UA-Compatible does not work.
The solution to edit MicrosoftAjax.js can not do, where to find this file?
Posted by Hemendra Shah on 5/1/2013 at 6:06 AM
I spent a lot...

I figure out the one option. I have modified the MicrosoftAjax.js and MicrosoftAjax.debug.js file for rounding the point value before returning Sys.UI.Point for all areas - see as below.

            if (typeof param1 === "number")
                param1 = Math.round(param1);

            if (typeof param2 === "number")
                param2 = Math.round(param2);

            return new Sys.UI.Point(param1, param2);

I have referenced modified js file using Script option in ScriptManager code of ASPX page. Thats it done.

I hope it helps other.
Posted by Hemendra Shah on 4/30/2013 at 11:24 PM
I have application using .NET 2.0 with Ajax-toolkit 1.0 and running application under IE 10, I have the same issue of SCRIPT5022: Sys.ArgumentOutOfRangeException: Value must be an integer.

I have already tried below things.
    1. I have installed hot-fix KB2784148 Windows 7 SP1, which does not worked for me.
    2. I have installed hot-fix KB2600100, which is to resolve another issue of _doPostBack.
    3. It works while running application under the IIS application pool with .NET 4.0/4.5.
            3.1 I keep this approach as secondary as it may involves risk for other functionality of our application.
    4. It works fine with compatibility change, which is not preferred.
    5. Adding JS code for changing x and y, which does not worked for me.
    6. Overriding LoadPostData, not tried as needs more detail for this.
    7. Border setting not useful even application not using Iframe.

I have faced issue with Button control apart from ImageButton.

I have provided simple code to reproduce the issue under the Ajax Enabled website in .NET 2.0 with VS2005.

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:TextBox ID="txtDesc" TabIndex="9" runat="server" Width="90%" Text="Test data"></asp:TextBox>
            <asp:Button ID="btnSearch" TabIndex="7" runat="server" Text="Search"></asp:Button>

I look forward the resolution for this issue. Thanks in advance.
Posted by Kiyokura on 1/28/2013 at 5:13 AM
Today, I apply HotFix(kb2784147) to Windows 2003 Server, bat still unresolve in ASP.NET 2.0 apps.
And, this problem occured on IE 10 preivew on Windows 7.

Posted by metal0xide on 1/21/2013 at 6:57 AM
This is still unresolved in .NET 3.5. Any plans to fix?
Posted by Microsoft on 12/31/2012 at 1:15 AM
please check below links for more details. (.net 4.0) (.net 2.0)

Posted by mrspangle on 12/27/2012 at 6:40 AM
@Satish S

What I meant was that MS have changed the behaviour in their browser (to transmit coordinates as decimal), but have forgot to update the code in LoadPostData which assumes that value as being an integer and falls over.

In the end we wrote a HttpModule which reads every form post and converts the decimal X & Y to integer before LoadPostData is called. We installed it server wide and is currently working for .net 1, 2, 3.5 + 4 web apps.

What I do not understand is why MS changed this in the first place?
Posted by kenb111111 on 12/12/2012 at 8:30 AM
We are also experiencing this problem with ASP.Net 4 WebForms image buttons when a user has Windows 8 & Internet Explorer and are planning on Installing .Net 4.5 on our web servers (to avoid making code changes).

Does anyone know if Installing .Net 4.5 will cause any other issues with Webforms?

Are there any other known issues?

We don't want to solve this problem only to encounter others?
Posted by g_hodges on 10/26/2012 at 11:27 AM
I added a workaround that works by overriding the x and y coordinates with javascript.
Posted by bpell on 10/18/2012 at 4:22 PM
I had posted that telling the page to render for IE8/IE9 works. However, I have found that when *that* page is in an IFrame it depends on the parent page (and when you don't have control over the parent page creating the IFrame it means that the page still breaks because IE renders for the parent page).
Posted by Satish S on 9/19/2012 at 10:31 PM

.NET Framework version 2.0.

.NET Framework version 4.5.


Above links says there is no changes. do you mean to say the above? could you please confirm.


is our observations are correct?

Posted by mrspangle on 9/19/2012 at 4:57 AM
The issue is that Microsoft have changed the X and Y coordinate that is transmitted in a form post from an integer to double when clicking on an imagebutton.

The LoadPostData function in ImageButton class is doing:


Where val is either the X and Y co-ordinate.

In all other browsers prior to IE10 the co-odinate will be an integer, in IE10 will be a double.

Why microsoft??? Who needs less than a pixel accuracy?
Posted by Satish S on 9/18/2012 at 2:36 AM
Please note:

Our application is developed in Framework 2.0 and we are making our application to work in windows8 and 2012 with IE10 and pointing to Framework 2.0

Please Refer the below link for the detail of the issue.

Our observations:

1.In IE 10 ToolKitScriptManager is NOT ABLE TO IDENTIFY the image button id when page is making Asynchronous post back because of update panel.

2.If we register the image button control to the " ToolkitScriptManager" after button is created. then we are not observing this issue in IE10.

Below is the sample code which we registered to " ToolkitScriptManager" for your reference

                ImageButton imgbtn = new ImageButton();
                imgbtn.ID = "img";
                imgbtn.ImageUrl = @"./btn_login.png";
                imgbtn.Command += new CommandEventHandler(OnCancelClick);
                imgbtn.CommandName = "OnCancelClick";
                imgbtn.CausesValidation = false;
                ToolkitScriptManager tkt = (ToolkitScriptManager)Master.FindControl("ToolkitScriptManager");

3.we observe when Imagebutton declared as static in aspx page also needs "PostbackTigger" to be added.

<asp:UpdatePanel ID="upbuttons" runat="server" UpdateMode="Always">
        <div class="right">
            <asp:ImageButton ID="Button_UpdateStatus" runat="server" />
         <div class="right">
            <asp:ImageButton Visible="false" ID="Button_UpdateStopStatus" runat="server"/>
        <asp:PostBackTrigger ControlID="Button_UpdateStatus" />
        <asp:PostBackTrigger ControlID="Button_UpdateStopStatus" />
Our Queries:

1.We would like to know whether the fix what we made above is Correct?
2.Is IE10 following any new standards other than HTML5?
3.Only IE10 browser is expecting the image button ID to be created every time to map during post back.
4.please confirm whether "ToolKitScriptManager" and "Update Panel" is having any issues in IE10 windows 8 and windows 2012.
Posted by p_sie on 9/18/2012 at 1:37 AM

By using

        <clear />
        <add name="X-UA-Compatible" value="IE=9" />

in the system.webServer node in the web.config file, the site works.
Posted by Damian [MSFT] on 9/17/2012 at 3:23 PM
This issue was fixed in .NET 4.5. We are investigating supplying a fix for .NET 4.0. In the meantime, you might try using the X-UA-Compatibility http-equiv meta tag (or header) to force IE into IE9 rendering mode.
Posted by Satish S on 9/14/2012 at 4:40 AM
Observed same type of issue, please refer the below link for issue details.

Posted by Superfly. _ on 8/22/2012 at 1:02 PM
I was able to work around this problem by installing .NET Framework 4.5 on our Windows 2008 R2 IIS server.
Posted by Superfly. _ on 8/21/2012 at 12:22 PM
I can confirm the same issues with my companies webportal.

1. I have a list view inside and updatepanel. I have 3 ImageButtons that call an invoiceDetails_Click Sub. When I click on any of the buttons it generates the "Input string was not in a correct format." error.

2. If I turn compatibility view on the buttons work.

3. If I change from an ImageButton to a LinkButton it works as well.
Posted by Helen [MSFT] on 7/26/2012 at 11:29 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by p_sie on 7/26/2012 at 1:53 AM
When I create a new project it works ok?!
But existing projects have been affected.
In an existing project I created a new page with the following code:
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <asp:ImageButton ID="ImageButton2" runat="server"
                ImageUrl="~/images/pijlbeneden.png" />
            <br />

Sorry, but I am not allowed to send you the original projects. Maybe you can find something in the
web.config file:

<?xml version="1.0"?>
For more information on how to configure your ASP.NET application, please visit
    <add name="XXX" connectionString="Data Source=localhost;Initial Catalog=XXX;Persist Security Info=True;User ID=xxx;Password=xxx" providerName="System.Data.SqlClient" />
     <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
        <add assembly="System.Web.Extensions.Design, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.Build.Framework, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <customErrors defaultRedirect="fout.aspx" redirectMode="ResponseRedirect" mode="RemoteOnly"></customErrors>
    <authentication mode="Forms">
     <forms loginUrl="~/login.aspx" protection="All" name=".ASPXAUTH" timeout="2880" slidingExpiration="true"/>
     <deny users="?" />
     <allow users="*" />
     <smtp from="xxx">
        <network host="xxx" port="25" password="" userName=""/>
    <validation validateIntegratedModeConfiguration="false" />
     <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Posted by Helen [MSFT] on 7/25/2012 at 7:47 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project to demonstrate this issue so that we can conduct further research?

We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Macy [MSFT] on 7/25/2012 at 1:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(