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 339:                        ltlContentNews.Text = sm_content.Content.GetFieldValue("content")
Line 340:
Line 341:                        ltlDataNews.Text = "<li><i class=""fa fa-calendar""></i> " & Common.FormataData(CDate(sm_content.Content.GetFieldValue("date"))) & "</li>"
Line 342:
Line 343:                        If Not sm_content Is Nothing And Not sm_content.Content Is Nothing And sm_content.Content.GetFieldValue("CategoriaNoticia") <> "0" Then

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

Stack Trace:


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


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