Link to home
Start Free TrialLog in
Avatar of 23-degrees
23-degreesFlag for United States of America

asked on

Input string was not in a correct format.

Hi,

I'm having an error on my asp.net 2.0 application. (please refer to the Server Error details at bottom)
On my website "http://www.cobrevalleymotors.com/Default.aspx". When user clicks on tabs below the main image, like New, User, Trucks, Specials. It some times works fine and some times raise following error. These tabs are Anthem:LinkButons which binds specific data on click and update the Anthem:Panel containing that data control.

I've tried to debug and find the problem line in my code but could not get that because as soon the user clicks on a tab it immidiatly goes to this error details page with out even executing the Page_Load event handler.

Any help will be appriciated.

Regards.


=======================
Server Error in '/' Application.
--------------------------------------------------------------------------------

Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753299
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
   System.Int32.Parse(String s, IFormatProvider provider) +22
   System.Web.UI.WebControls.ImageButton.LoadPostData(String postDataKey, NameValueCollection postCollection) +192
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +36
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +895
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2547

 --------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
ASKER CERTIFIED SOLUTION
Avatar of deepu chandran
deepu chandran
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It works fine, I dont find any err in that..
Avatar of ROMA CHAUHAN
Yes i m also not getting any error.
You can do one thing , you can use .ToString() function wherever is needed for variables. And make sure you are passing string value in string variable parameters and int to int parameters.

If you know the code line from where u r getting this error and the webservice is on your local machine then you can keep the debug point and debug your code as well.