Reputation: 3495
I am using <asp:ImageButton>
inside <asp:GridView>
as below shown.
Problem:
This is working fine in Chrome and FireFox, but event not firing when I used Internet Explorer.
.aspx Code
<asp:GridView ID="gvPatAppointment" EmptyDataText="No Data Found" runat="server"
AutoGenerateColumns="false" DataKeyNames="capp_uniq_id"
OnRowDataBound="gvPatAppointment_RowDataBound" >
<Columns>
<asp:TemplateField HeaderStyle-CssClass="gridHeader" HeaderText="Cancel">
<ItemTemplate>
<asp:ImageButton BorderStyle="None" ToolTip="Cancel Appointment" ID="ImgCancel"
runat="server" ImageUrl="~/App_Themes/NewTheme/images/CssImages/delete-file-icon.png"
CommandArgument='<%# Eval("capp_uniq_id") %>'
OnClick="ImgCancel_Click"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
.aspx.cs Code
protected void ImgCancel_Click(object sender, EventArgs e)
{
lblMessage.Text = string.Empty;
mdpCancelAppt.Show();
SelectedAppointment = string.Empty;
ImageButton ImgCancel = (ImageButton)sender;
SelectedAppointment = Convert.ToString(ImgCancel.CommandArgument.ToString());`
}
Upvotes: 2
Views: 1252
Reputation: 17614
according to your error message
This is occurring because your submit button is an input
with type="image"
(As it is render as input type='image'). Therefore, coordinates are submitted with the form. Previous versions of Internet Explorer submit those coordinates as integers, but Internet Explorer 10 submits them as decimals.
There are a variety of ways to fix it. See this question and this bug report for some solutions.
Similar Questions
Upvotes: 3