Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 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 Display Modes
  #1 (permalink)  
Old May 5th, 2015, 08:45 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2014
Posts: 6
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: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2014
Posts: 6
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?
 


Thread Tools
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
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 01:13 PM



All times are GMT -4. The time now is 07:26 PM.


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