Server Error in '/' Application.

Conversion from string "" to type 'Date' 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 string "" to type 'Date' is not valid.

Source Error:


Line 321:                        ltlNewsTitle.Text = sm_content.Content.GetFieldValue("title")
Line 322:
Line 323:                        ltlNewsData.Text = Common.FormataData(CDate(sm_content.Content.GetFieldValue("date")))
Line 324:
Line 325:                        If Not sm_content Is Nothing And Not sm_content.Content Is Nothing And sm_content.Content.GetFieldValue("lead") <> "" Then

Source File: D:\_SITES\accportugal.pt - www\_components\contents\content.ascx.vb    Line: 323

Stack Trace:


[InvalidCastException: Conversion from string "" to type 'Date' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(String Value) +174
   _components_content.Page_Load(Object sender, EventArgs e) in D:\_SITES\accportugal.pt - www\_components\contents\content.ascx.vb:323
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2852


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