Trying to fire asclick event aspick: ImageButton

My asp: ImageButton doesn't fire onclick event in IE, but works fine on chrome or firefox.

Don't know if my code is right, but it's here:

<asp:ImageButton ID="SaveBtn" runat="server" OnClick="Save_Click"
                 ToolTip="Save" ImageUrl="images/save.png" />

      

Using the .NET Framework 3.5

Note: IE10

+3


source to share


1 answer


Just install .NET Framework 4.5

There is a bug in IE10.

IE10 does not correctly convert coordinates to decimal and not integers. This causes the ImageButton clicks to fail.

You can try a workaround like:



- change ImageButton to LinkButton and put button image inside it.

Your code will look like this:

<asp:LinkButton ID="SaveBtn" runat="server" OnClick="Save_Click">
     <asp:Image ID="Image1" runat="server" ImageUrl="images/save.png" ToolTip="Save" />
</asp:LinkButton>

      

Take a look here .

+2


source







All Articles