Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting the error "JavaScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.", When firing data list item command, Its happening only with IE 10, Any of them have solution, Please reply
Posted
Updated 9-Apr-14 1:30am
v2
Comments
Er. Puneet Goel 9-Apr-14 7:24am    
please post your code block where you are getting this error
Shajahan Sherafudeen 9-Apr-14 7:43am    
Data List Structure is

<asp:DataList ID="subMenu" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
OnItemCommand="listViewTest_ItemCommand" DataKeyField="productId" DataSource='<%# Eval("subCategory") %>'>
<itemtemplate>
<table style="width:158px;height:195px;display:inline;float:left;margin-right:20px;text-align:center;margin-top:10px;">
<tr>
<td> <%--Width="156" Height="144" --%>
<asp:ImageButton ID="ibtnProduct" runat="server" Width="156" Height="144" ToolTip='<%# Eval("itemName") %>'
ImageUrl='<%# Eval("images") %>'
CommandArgument='<%# Eval("productId") %>' CommandName="clickSubMenu" BorderStyle="Solid" BorderWidth="1" BorderColor="#CCCCCC" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("itemName") %>'>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text='<%# Eval("price","{0:C}") %>'>
</td>
</tr>
<tr>
<td>
Avg. Rating:<asp:Image ID="Image1" runat="server" ImageUrl="~/images/rating.gif" width="60" height="11" />
</td>
</tr>
</table>



I am binding this datalist with values

Datalist item Command Firing shown below

protected void listViewTest_ItemCommand(object sender, CommandEventArgs e)
{
if (e.CommandName == "clickSubMenu")
{
int productID = Convert.ToInt32(e.CommandArgument.ToString());
Response.Redirect("productDetails.aspx?pdtID=" + productID + "");
}
}

Java Script error happening only with IE 10, Rest browsers working fine.

Seems that problem is due to ImageButtons and it is a Bug.
Read possible fixes at - How To Understand dynamic HTML in Visual Studio 2008?[^].

Quick Fix


Replace ImageButton with a LinkButton and asp:Image inside it.
 
Share this answer
 
I have undergone the same problem with Internet Explorer 10.
Please make sure your browser running with 100% Zoom and Set the IE in compatibility View then all errors gone away. If still someone searching for the same problem please you could give it a try by setting the IE in compatibility mode for that website.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900