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 230:                        strMotivord = strMotivord & ", "
Line 231:                    End If
Line 232:                    strMotivord = strMotivord & "<a href=""sok.aspx?s=" & Trim(MotivRow(s)("strMotivOrd")) & """>" & Trim(MotivRow(s)("strMotivOrd")) & "</a>"
Line 233:                Next
Line 234:                motivord.Text = strMotivord

Source File: D:\Webbsidor\umbraco_murberget_2016\usercontrols\upptack\fotopost.ascx.vb    Line: 232

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1033
   fotopost.Foto(String strFotoId) in D:\Webbsidor\umbraco_murberget_2016\usercontrols\upptack\fotopost.ascx.vb:232
   fotopost.Page_Load(Object sender, EventArgs e) in D:\Webbsidor\umbraco_murberget_2016\usercontrols\upptack\fotopost.ascx.vb:53
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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