Server Error in '/' Application.

Operator '<>' is not defined for type 'DBNull' and string "".

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: Operator '<>' is not defined for type 'DBNull' and string "".

Source Error:


Line 49:             End If
Line 50: 
Line 51:             If meinDatenleser("Downloadlink1") <> "" And meinDatenleser("Downloadlink_Beschreibung1") <> "" Then
Line 52:                 pdf.Visible = True
Line 53:                 HLpdf.NavigateUrl = "upload/pdf/dokumente/" & meinDatenleser("Downloadlink1")

Source File: E:\www\vhosts\uvs.ch\httpdocs\dokumentendetail.aspx.vb    Line: 51

Stack Trace:


[InvalidCastException: Operator '<>' is not defined for type 'DBNull' and string "".]
   Microsoft.VisualBasic.CompilerServices.Operators.CompareObjectNotEqual(Object Left, Object Right, Boolean TextCompare) +1319836
   dokumentendetail.Page_Load(Object sender, EventArgs e) in E:\www\vhosts\uvs.ch\httpdocs\dokumentendetail.aspx.vb:51
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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