IE10 sending image button click coordinates with decimals (floating point values) causing a ParseInt32 FormatException

后端 未结 10 1074
情深已故
情深已故 2020-12-08 07:48

It seems like ASP.NET 4.0 is not prepared to handle ImageButton events triggered by Internet Explorer 10. The problem is that IE10 sends the image click coordinates as doubl

10条回答
  •  -上瘾入骨i
    2020-12-08 07:56

    In my case I am not currently able to upgrade .Net to 4.5 and I didn't want to use JavaScript to patch the bug.

    The solution that I went with was to convert my ImageButton to a LinkButton:

    This was my ImageButton:

    
    

    This is the LinkButton I replaced it with:

    
        
    
    

    From the user's perspective, it all works the same as it did before....but without the crashing in IE.

提交回复
热议问题