Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Wrox Announcements and Feedback > All Other Wrox Books
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books 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
  #1 (permalink)  
Old June 27th, 2003, 05:45 PM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Add to Cart Error: Object not set as an instance

After building the solution and browsing the site, I get an error message if I try to add an item to the cart. I get this error: "Object reference not set to an instance of an object." However, if I create a user and add an item to the cart while signed in with a user, it allows the add. Help would be lovely.

Line 248: oi.SKU = (string)currentRow["SKU"];
Line 249: oi.Special = false;
Line 250: >>>>>>>>>>>>>>> currentOrder.OrderItems.Add( oi );
Line 251:
Line 252: currentRunningTotal += extPrice;

Source File: C:\Inetpub\wwwroot\GWSetup\ShoppingCart.aspx.cs Line: 250

This is DIRECTLY after installing all code, restoring database, building the solution, and browsing the site - ALL within Visual Studios .NET and NOT hand-coded.

Thank - Garby





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error - Object reference not set to an instance ? venkikrao VB.NET 2 July 5th, 2007 01:00 AM
Error: Object Reference not set to an instance. Nosfe_X VB Databases Basics 2 June 23rd, 2006 04:10 PM
Object Reference not set to an instance of object srinivas_chakka ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 11:56 AM
Object Reference is Not Set to an Instance of an O blackinwhite General .NET 4 February 1st, 2005 05:42 AM





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