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 53:         While rs.Read
Line 54:             Me.Title = "TriventinaMente - " & rs("titolo")
Line 55:             lb_titolo.Text = rs("titolo")
Line 56:             idDoc.Text = rs("IdDoc")
Line 57: 

Source File: D:\inetpub\webs\triventinamenteit\editoriale-trivento.aspx.vb    Line: 55

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +862
   editoriale_trivento.articolo(Int32 id) in D:\inetpub\webs\triventinamenteit\editoriale-trivento.aspx.vb:55
   editoriale_trivento.editoriale_trivento_load(Object sender, EventArgs e) in D:\inetpub\webs\triventinamenteit\editoriale-trivento.aspx.vb:20
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2848


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