最近在项目中遇到一个棘手问题,在IE10中,一些图片按钮点了毫无反应,其他浏览器(包括IE9)都正常;查看后台,发现如下异常信息:

Input string was not in a correct format.

stack: 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.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.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)

Google了一下,被证实是IE10 在.Net 4.0下的Bug,原因是IE10下,ToolKitScriptManager 不能正确的识别UpdatePanel里的ImageButton的ID,解决方法有三个:

1) 用LinkButton+图片的方式替换ImageButton

2) 安装.Net 4.5框架

3)取消ImageButton的异步回传:

ToolkitScriptManager tkt =(ToolkitScriptManager)Master.FindControl("ToolkitScriptManager");

      tkt.RegisterPostBackControl(ImageButton); 或者 设置UpdatePanel的 “PostbackTigger”

ImageButton 在IE 10 下的异常的更多相关文章

  1. 编写高质量代码改善C#程序的157个建议[用抛异常替代返回错误、不要在不恰当的场合下引发异常、重新引发异常时使用inner Exception]

    前言 自从.NET出现后,关于CLR异常机制的讨论就几乎从未停止过.迄今为止,CLR异常机制让人关注最多的一点就是“效率”问题.其实,这里存在认识上的误区,因为正常控制流程下的代码运行并不会出现问题, ...

  2. ubuntu15.10下编译安装wine1.8 rc4

    ubuntu15.10下编译安装wine1.8rc4 Wine (“Wine Is Not an Emulator” 的递归缩写)是一个能够在多种 POSIX-compliant 操作系统(诸如 Li ...

  3. suse linux 10 下配置vpn服务器(pptp)

     一.安装所需的软件包:      pptpd-*.rpm      ppp-*.rpm      pptp-*.rpm     一般情况下系统已经将pptp和ppp包安装好了,所以只需安装pptpd ...

  4. 解决Windows 10下Wireshark运行问题

    解决Windows 10下Wireshark运行问题在Windows 10下,安装Wireshark时候,提示WinPcap不被系统系统支持.这是由于最新版的WinPcap 4.1.3只支持到Wind ...

  5. Solaris 10下Qt编译Oracle 10g驱动

    上回书讲到<Oracle 10g在Solaris 10中安装详解>,现在开始用Qt来编译下Oracle 10g驱动吧!这样就可以通过Qt程序联入Oracle数据库了! Oracle的环境变 ...

  6. javascripy的innerHTML在IE8下的异常

    使用jQuery的datatable插件的时候发现,IE8下显示异常,仔细调查一番,发现是浏览器对innerHTML的差异导致的. 实例代码: var nTd = document.createEle ...

  7. Solaris 10下使用Python3

    通常在Solaris 10上仅仅能使用Python2.x. 假设使用Python3的话,一种就是http://www.sunfreeware.com获取可用的二进制版本号.只是眼下这个站点已经不提供免 ...

  8. ubuntu12.10下OpenFoam的编译

    最近在ubuntu12.10下编译OpenFoam,遇到一些问题,小记一下. 首先到官网下载源码包(我这里下载的是OpenFOAM-2.3.0.tgz,ThirdParty-2.3.0.tgz). 1 ...

  9. Ubuntu 11.10下GRUB 2 1.99版编译安装笔记

    Ubuntu 11.10下GRUB 2 1.99版编译安装笔记 以下的安装笔记,都是QLi自己学习grub2 时,所整理的,还是新手,有错误的话,请大家帮忙就别提出来了. 最新版grub V1.99官 ...

随机推荐

  1. 使用PowerDesigner建立数据库模型

    转自:http://www.cnblogs.com/tonyepaper/archive/2008/02/12/1067260.html 1.       打开PowerDesigner,点击File ...

  2. mysql服务启动 但端口未监听

    mysql 启动了,用 localhost 可以连接,但是用 127.0.0.1 不能连接.可能的原因是 1. mysql为了增强安全性而跳过了端口监听,查看方法: 用mysql> SHOW V ...

  3. python模拟登录人人网

    参考: http://www.cnblogs.com/txw1958/archive/2012/03/12/2392067.html http://www.cnblogs.com/chenyg32/a ...

  4. linux c遍历文件夹 和文件查找的方法

    linux c遍历文件夹的方法比较简单,使用c来实现 #include <iostream> #include <stdio.h> #include <sys/types ...

  5. 察看so文件的依赖关系

    使用arm-linux-androideabi-readelf 察看依赖动态库 /android-ndk-r8d/toolchains/arm-linux-androideabi-4.7/prebui ...

  6. 【HTML】Beginner1:TagsAttributesElements

    HTML(Hypertext Text Mark-up Language)&(How To Make L) HTML is used for meaning and CSS is used f ...

  7. HW2.17

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  8. 64位linux安装android sdk的问题

    截至到今天,似乎在64位机器下安装android sdk存在不能运行的问题,可以用以下方法解决: Android SDK requires: Fedora 17 64bit with 32bit An ...

  9. 如何将可执行文件打包至APK并运行(转)

    原文链接:http://www.lupaworld.com/home.php?mod=space&uid=345712&do=blog&id=248921 好久没有写bolg了 ...

  10. map的基本操作函数及含义

    map的基本操作函数:      C++ Maps是一种关联式容器,包含“关键字/值”对      begin()          返回指向map头部的迭代器      clear()        ...