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 24:         If dr.Read Then
Line 25:             myTitle = dr(0)
Line 26:             myDesc = dr(1)
Line 27:         End If
Line 28: 

Source File: C:\webs\_websites\themasports.com\templates\controls\CategoryTitle.ascx    Line: 26

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1033
   ASP.templates_controls_categorytitle_ascx.Page_Load(Object sender, EventArgs e) in C:\webs\_websites\themasports.com\templates\controls\CategoryTitle.ascx:26
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.BasePartialCachingControl.LoadRecursive() +70
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Control.LoadRecursive() +162
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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