Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
  #1 (permalink)  
Old May 5th, 2015, 08:45 AM
Registered User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2014
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default Need help with this error in Beerhouse framework

This is in preview - not on web. It was working fine. Then the only thing I did was try out the shopping cart by adding an item and then following through to the point where you click to go to paypal. I stopped there and didn't follow through and just closed the preview window. Later when I tried to preview some pages, it keeps referencing an error in shopping cart code as shown below:

Server Error in '/A_Taurus' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 12: <small>
Line 13: <asp:Image runat="Server" ID="imgProduct" ImageUrl="~/Images/ArrowR3.gif" GenerateEmptyAlternateText="true" />
Line 14: <%# Eval("Title") %> - <%# (this.Page as BasePage).FormatPrice(Eval("UnitPrice")) %> &nbsp;&nbsp;<small>(<%# Eval("Quantity") %>)
Line 15: <br /></small>
Line 16: </ItemTemplate>


Source File: c:\A_Taurus\Controls\ShoppingCartBox.ascx Line: 14

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
ASP.controls_shoppingcartbox_ascx.__DataBind__cont rol4(Object sender, EventArgs e) in c:\A_Taurus\Controls\ShoppingCartBox.ascx:14
System.Web.UI.Control.OnDataBinding(EventArgs e) +99
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +211
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
System.Web.UI.Control.DataBind() +15
System.Web.UI.WebControls.Repeater.CreateItem(Int3 2 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124
System.Web.UI.WebControls.Repeater.CreateControlHi erarchy(Boolean useDataSource) +443
System.Web.UI.WebControls.Repeater.OnDataBinding(E ventArgs e) +51
System.Web.UI.WebControls.Repeater.DataBind() +75
MB.TaurusCorporation.UI.Controls.ShoppingCartBox.P age_Load(Object sender, EventArgs e) in c:\A_Taurus\Controls\ShoppingCartBox.ascx.cs:26
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

Please help!
  #2 (permalink)  
Old May 5th, 2015, 09:10 AM
Registered User
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2014
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I just re-ran in preview mode and noticed the side bar showed shopping cart. I clicked that and removed the item I had in shopping cart and then tried to view the other pages which were throwing an error and now its working again.

I should still have some way of handling that error shouldn't I ? Or once uploaded if someone left something in shopping cart and closed the page, would they get that dreaded VS error page?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Framework error stuartward BOOK: Microsoft SQL Server 2008 Integration Services Problem-Design-Solution 5 November 1st, 2011 09:32 AM
The BeerHouse and Entity Framework docluv BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 3rd, 2008 01:32 PM
The BeerHouse 'Connection String Error' nesrine C# 1 March 21st, 2007 01:28 AM
Urgent help -- error raised with framework 2.0 Vinjamuri BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 May 30th, 2006 01:28 PM
Compact Framework Error spawning ". ????? drb2k2 General .NET 0 March 9th, 2005 02:13 PM





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