Problem With Total in the Shopping Cart
This is the code in the ShoppingCart.aspx.cs page
lblTotal.Text = this.FormatPrice(this.Profile.ShoppingCart.Total +
Convert.ToDecimal(ddlShippingMethods.SelectedValue ));
System.FormatException was unhandled by user code
Message="Input string was not in a correct format."
Source="mscorlib"
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDecimal(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Decimal.Parse(String s, IFormatProvider provider)
at System.Convert.ToDecimal(String value)
at CarStereo.UI.ShoppingCart.UpdateTotals() in c:\Websites\VibeCarStereo\ShoppingCart.aspx.cs:lin e 45
at CarStereo.UI.ShoppingCart.Page_Load(Object sender, EventArgs e) in c:\Websites\VibeCarStereo\ShoppingCart.aspx.cs:lin e 23
at System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|