Server Error in '/' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

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.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:


Line 48:                             <div><%#Eval("Societa Distribuzione") %></div>
Line 49:                             <div><%#IIf(Eval("Scripted").ToString() = "SI", Eval("Societa Produzione"), "") & " " & IIf(Eval("Rete Televisiva").ToString() <> "", " for " & Eval("Rete Televisiva"), "") %></div>
Line 50:                             <div><%#Server.HtmlDecode(Eval("Sinossi Eng")) %></div>
Line 51:                             <%#IIf(Eval("WeblinkEsterno").ToString() = "SI" And Eval("Weblink").ToString() <> "", "<div><a href='" & Eval("Weblink").ToString() & "' class='btn btn-primary video-btn' target='_blank'>Play trailer</a>", "")%>
Line 52:                             <%#IIf(Eval("WeblinkEsterno").ToString() = "" And Eval("Weblink").ToString() <> "", "<div><button type='button' class='btn btn-primary video-btn' data-toggle='modal' data-src='" & Eval("Weblink").ToString() & "' data-target='#myModal'>Play trailer</button></div>", "")%>

Source File: D:\inetpub\webs\liliumdistributionit\scheda_eng.aspx    Line: 50

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +862
   ASP.scheda_eng_aspx.__DataBind__control5(Object sender, EventArgs e) in D:\inetpub\webs\liliumdistributionit\scheda_eng.aspx:50
   System.Web.UI.Control.OnDataBinding(EventArgs e) +79
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +153
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +181
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +163
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.WebControls.ListView.CreateItemsWithoutGroups(ListViewPagedDataSource dataSource, Boolean dataBinding, InsertItemPosition insertPosition, ArrayList keyArray) +834
   System.Web.UI.WebControls.ListView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1032
   System.Web.UI.WebControls.ListView.PerformDataBinding(IEnumerable data) +35
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +153
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +169
   System.Web.UI.WebControls.ListView.PerformSelect() +103
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +71
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +93
   System.Web.UI.WebControls.ListView.CreateChildControls() +52
   System.Web.UI.Control.EnsureChildControls() +116
   System.Web.UI.Control.PreRenderRecursiveInternal() +49
   System.Web.UI.Control.PreRenderRecursiveInternal() +236
   System.Web.UI.Control.PreRenderRecursiveInternal() +236
   System.Web.UI.Control.PreRenderRecursiveInternal() +236
   System.Web.UI.Control.PreRenderRecursiveInternal() +236
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4711


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