Server Error in '/' Application.

Object cannot be cast from DBNull to other types.

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: Object cannot be cast from DBNull to other types.

Source Error:


Line 288:                                    <ItemTemplate>
Line 289:                                    <div>
Line 290:                                     <asp:Image ID="Image1" runat="server" vspace="5" hspace="10" align="right" style="border:#CCCCCC 1px solid;" Height='<%# Convert.ToInt32(Eval("Height")) %>' ImageUrl='<%# Eval("image_path") %>' Width='<%# Convert.ToInt32(Eval("Width")) %>'/>
Line 291:                            	     <p><asp:Label ID="full_textLabel" runat="server" Text='<%# Eval("full_text") %>'></asp:Label></p>
Line 292:                                 	</div>

Source File: D:\InetPub\vhosts\raytna-3702.package\raytnanews.com\wwwroot\News.aspx    Line: 290

Stack Trace:


[InvalidCastException: Object cannot be cast from DBNull to other types.]
   System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +57
   System.Convert.ToInt32(Object value) +28
   ASP.news_aspx.__DataBinding__control14(Object sender, EventArgs e) in D:\InetPub\vhosts\raytna-3702.package\raytnanews.com\wwwroot\News.aspx:290
   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.Control.DataBindChildren() +181
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +163
   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.Control.DataBindChildren() +181
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +163
   System.Web.UI.WebControls.FormView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +1797
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
   System.Web.UI.WebControls.FormView.PerformDataBinding(IEnumerable data) +13
   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.BaseDataBoundControl.DataBind() +71
   System.Web.UI.WebControls.FormView.DataBind() +5
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +93
   System.Web.UI.WebControls.FormView.EnsureDataBound() +189
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
   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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4717


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