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 129:               
Line 130:               ' Controllo pubblicazione link 1
Line 131:               If controllolink(CStr(dst.Tables("Personaggio").Rows(0).Item(6))) Then
Line 132:                   HyperLink1.NavigateUrl = CStr(dst.Tables("Personaggio").Rows(0).Item(6))
Line 133:                   HyperLink1.Text = CStr(dst.Tables("Personaggio").Rows(0).Item(6))

Source File: D:\inetpub\webs\tuttostorianet\personaggi-storici.aspx    Line: 131

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +452708
   ASP.personaggi_storici_aspx.Page_Overloads(Object sender, EventArgs e) in D:\inetpub\webs\tuttostorianet\personaggi-storici.aspx:131
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.9174; ASP.NET Version:2.0.50727.9175