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 19:     Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs)
Line 20:         Dim view As Data.DataRowView = CType(FormView1.DataItem, Data.DataRowView)
Line 21:         Dim o As Object = view.Item("staticURL")
Line 22:         If Not o Is Nothing AndAlso Not IsDBNull(o) Then
Line 23:             Dim staticurl As String = CStr(o)

Source File: C:\Inetpub\vhosts\benev.be\httpdocs\News\View.aspx    Line: 21

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.news_view_aspx.FormView1_DataBound(Object sender, EventArgs e) in C:\Inetpub\vhosts\benev.be\httpdocs\News\View.aspx:21
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +97
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +140
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.WebControls.FormView.DataBind() +4
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.FormView.EnsureDataBound() +166
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842


Version Information: Microsoft .NET Framework Version:2.0.50727.3662; ASP.NET Version:2.0.50727.3668