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:         If Not IsDBNull(dr("Attachment1_Link")) Then
Line 49:             HyperLink1.NavigateUrl = dr("Attachment1_Link")
Line 50:             HyperLink1.Text = dr("Attachment1_Title")
Line 51:         End If
Line 52:         If Not IsDBNull(dr("Attachment2_Link")) Then

Source File: C:\Domains\shq.lasdnews.net\pages\NewsRelease.aspx.vb    Line: 50

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +452600
   Pages_NewsRelease.Page_Load(Object sender, EventArgs e) in C:\Domains\shq.lasdnews.net\pages\NewsRelease.aspx.vb:50
   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.8000; ASP.NET Version:2.0.50727.8001