Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2007, 01:15 PM
Registered User
 
Join Date: Aug 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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)


 
Old October 27th, 2007, 09:33 AM
Registered User
 
Join Date: Aug 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Problem solved I had commented out the call to the dropdownlist databind in Page_Load.






Similar Threads
Thread Thread Starter Forum Replies Last Post
shopping cart problem...! preetham.sarojavenkatesh Visual Studio 2005 1 November 13th, 2007 12:29 PM
shopping cart problem Adam H-W Javascript 2 November 14th, 2006 12:57 PM
Problem with session on Shopping Cart comicghozt .NET Framework 1.x 6 September 21st, 2006 09:22 AM
Shopping Cart quantity update problem j2 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 August 21st, 2006 02:39 PM
having problem with shopping cart radonfile Classic ASP Databases 0 September 26th, 2003 12:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.