Server Error in '/' 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 38:         Dim Bike As New clsAssetItem(BikeID)
Line 39: 
Line 40: 		litBikeEnquire.Text = "<a href=" & GetXMLSiteProps(Me,"SITE_URL") & "enquire/used-bike/" & BikeID &"/" & Bike.Name.Replace(" ","-").ToLower & " class=""expand button used-model-enquire""><i class=""fa fa-envelope-o""></i> Make an Enquiry</a>"
Line 41: 		
Line 42:         litModelName.Text = Bike.Name

Source File: C:\inetpub\wwwroot\websites\Dealer Websites\All2Wheelers\view-used-bike.aspx.vb    Line: 40

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   view_used_bike.ShowBike(Int32 BikeID) in C:\inetpub\wwwroot\websites\Dealer Websites\All2Wheelers\view-used-bike.aspx.vb:40
   view_used_bike.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\websites\Dealer Websites\All2Wheelers\view-used-bike.aspx.vb:32
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0