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 136:        }
Line 137:
Line 138:        VideoPanel.Visible = System.IO.File.Exists(Server.MapPath("./painel/videos/anuncios_video" + Request.QueryString["cod"] + ".mp4"));
Line 139:
Line 140:        HiddenField hfDataFim = (HiddenField)FormView1.FindControl("HiddenFieldDataFim");

Source File: h:\root\home\mercadoriarural-001\www\mercadoriarural\anuncio.aspx.cs    Line: 138

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   anuncio.FormView1_DataBound(Object sender, EventArgs e) in h:\root\home\mercadoriarural-001\www\mercadoriarural\anuncio.aspx.cs:138
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +109
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +165
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +151
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +76
   System.Web.UI.WebControls.FormView.DataBind() +10
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
   System.Web.UI.WebControls.FormView.EnsureDataBound() +194
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +76
   System.Web.UI.Control.EnsureChildControls() +97
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Control.PreRenderRecursiveInternal() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +906


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