This project is read-only.

Object reference not set to an instance of an object.

Topics: Developer Forum, Project Management Forum, User Forum
May 18, 2010 at 11:58 AM

Server Error in '/TBH_Web' 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: d:\ONLINE SHOPPING CART\TBH_Web\Controls\ShoppingCartBox.ascx    Line: 14

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]

   ASP.controls_shoppingcartbox_ascx.__DataBind__control4(Object sender, EventArgs e) in d:\ONLINE SHOPPING CART\TBH_Web\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(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124

   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +443

   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +51

   System.Web.UI.WebControls.Repeater.DataBind() +75

   MB.TheBeerHouse.UI.Controls.ShoppingCartBox.Page_Load(Object sender, EventArgs e) in d:\ONLINE SHOPPING CART\TBH_Web\Controls\ShoppingCartBox.ascx.cs:26

   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(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)


May 19, 2010 at 3:33 PM

Do you have a reference to the Business Library? You should really open up the project by the primary solution file, not just the web site directly.