Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 3rd, 2009, 04:10 PM
Authorized User
 
Join Date: Mar 2009
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default DeleteShoppingCartItem error

I get the following error in firefox.

[ArgumentException]: The parameters dictionary contains a null entry for parameter 'productId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult DeleteShoppingCartItem(Int32)' in 'TheBeerHouse.Controllers.CommerceController'. To make a parameter optional its type should be either a reference type or a Nullable type.

It seems like it's looking for a dictionary pair???
This is similar to DeleteShippingMethod, except that works.
I'm at my wit...................s end.
  #2 (permalink)  
Old November 3rd, 2009, 04:12 PM
nberardi's Avatar
Wrox Author
 
Join Date: Aug 2008
Location: Phoenixville, PA, USA
Posts: 102
Thanks: 1
Thanked 16 Times in 16 Posts
Send a message via AIM to nberardi
Default

The "productId" parameter isn't getting submitted to the action.
__________________
Check out my blog at: http://www.coderjournal.com
The Following User Says Thank You to nberardi For This Useful Post:
ralphbethke (November 3rd, 2009)
  #3 (permalink)  
Old November 3rd, 2009, 04:21 PM
Wrox Author
 
Join Date: Aug 2008
Location: Pittsford, NY, USA.
Posts: 19
Thanks: 1
Thanked 4 Times in 4 Posts
Send a message via AIM to Al_Katawazi
Default To get this working

Alright this is a bug in the code we released. If you use firebug net tab and look at the post being made you can see under the post tab it is passing id instead of productid. to fix this problem simply change the variable name in the deleteshoppingcartItem action method from productID to id. Or change the offending javascript file to pass productID instead of id. Up to you.
The Following User Says Thank You to Al_Katawazi For This Useful Post:
ralphbethke (November 3rd, 2009)
  #4 (permalink)  
Old November 3rd, 2009, 04:58 PM
Authorized User
 
Join Date: Mar 2009
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default DeleteShoppingCart error

Thanks again guys,

I'm kind of embarrassed I didn't see that.

Not only are you guys good programmers...You're extremely prompt.

I stepped out for lunch and saw your reply when I returned.

Wish me luck...I'm getting ready to try out PayPal.

You the men!
  #5 (permalink)  
Old July 24th, 2010, 10:56 AM
Authorized User
 
Join Date: Dec 2008
Location: , , Greece.
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

when an iten is deleted, the Subtotal has to be updates as well.
otherwise the price remains the same.
if i refresh the page then is gone away but still is not workong properly
please advice!!!
  #6 (permalink)  
Old July 30th, 2010, 09:26 AM
Authorized User
 
Join Date: Dec 2008
Location: , , Greece.
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

could anyone please reply?
  #7 (permalink)  
Old August 5th, 2010, 09:30 AM
Authorized User
 
Join Date: Dec 2008
Location: , , Greece.
Posts: 56
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to fh84
Default

Finally!!!
I made it working with the help of AL!!!
In the ViewShoppingCart.aspx page simple add this:

[code]onclick="location.reload(true)"[/code]

within the <img> tag

hope it helps!
The Following User Says Thank You to fh84 For This Useful Post:
M3rcuryKT (March 30th, 2011)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Connection Error: Named Pipes Provider error hbansal ASP.NET 2.0 Basics 5 April 12th, 2009 09:51 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM



All times are GMT -4. The time now is 10:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.