Server Error in '/' Application- Input string was not in a correct format.
I'm trying to upload new products to my website created through product page templates, with a new product category. But when I click to go to the "second" page, I receive the following errror. Please help:
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:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7467367
System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +115
System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) +192
System.Convert.ToDouble(String value) +63
App_UserControls_products_ProductSpecSheet.BindProductSpecSheet(Product p) +277
App_UserControls_products_ProductSpecSheet.Page_Load(Object sender, EventArgs e) +129
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.AddedControl(Control control, Int32 index) +265
System.Web.UI.ControlCollection.Add(Control child) +80
Telerik.Cms.Web.InternalPage.AddPageControls(IPageContent pageContent, Dictionary`2 placeHolders) +398
Telerik.Cms.Web.InternalPage.CreateChildControls() +388
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
Hi Amy,
Can you please send us screenshots of the exact process of getting the error ( or a video if possible ) because I could not really understand how the issue can be reproduced. If possible provide exact steps for replicating the scenario.
Greetings,
Victor Velev
the Telerik team
Hello Amy,
The problem is most likely coming from the fact that the system cannot parse a string value to double. The issue is located in the following method:
BindProductSpecSheetPlease review it and check the bindings as it tries to convert a product value to a double.
StringToNumber
THANK YOU!! Your answer allowed me to fix the problem. I had entered (oz.) when that field automatically lists (oz.) for me in the product spec pages.
Thanks again!
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>