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 59: 
Line 60:             var hfStatus = (HiddenField)FormView1.FindControl("HiddenFieldStatus");
Line 61:             if (hfStatus.Value == "8" || hfStatus.Value == "10")
Line 62:             {
Line 63:                 var ltAbertura = (Literal)FormView1.FindControl("LiteralAbertura");

Source File: c:\inetpub\wwwroot\vialeiloes\leilao.aspx.cs    Line: 61

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   leilao.FormView1_DataBound(Object sender, EventArgs e) in c:\inetpub\wwwroot\vialeiloes\leilao.aspx.cs:61
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +125
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +133
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +105
   System.Web.UI.Control.EnsureChildControls() +106
   System.Web.UI.Control.PreRenderRecursiveInternal() +57
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Control.PreRenderRecursiveInternal() +226
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3670


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