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:             Page.Header.Controls.Add(myHtmlLink01)
Line 49: 
Line 50:             Page.Title = DR("title")
Line 51:         End If
Line 52: 

Source File: E:\web\ghadinew\Newsdet.aspx.vb    Line: 50

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1307492
   Newsdet.Page_Init(Object sender, EventArgs e) in E:\web\ghadinew\Newsdet.aspx.vb:50
   System.Web.UI.Control.OnInit(EventArgs e) +79
   System.Web.UI.Page.OnInit(EventArgs e) +12
   System.Web.UI.Control.InitRecursive(Control namingContainer) +390
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1633


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