Server Error in '/' Application.

String was not recognized as a valid DateTime.

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.FormatException: String was not recognized as a valid DateTime.

Source Error:


Line 17:         
Line 18:         Dim DateYear2007 As Date
Line 19:         DateYear2007 = Convert.ToDateTime("10/21/2007")
Line 20:         Year2007.Text = DateYear2007.ToLongDateString()
Line 21:         

Source File: E:\kunden\homepages\28\d380917168\www\Hello-Hyderabad\Festivals\Guides\Vijaya-Dashami\Dussehra-Dates.ascx    Line: 19

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +12836419
   System.Convert.ToDateTime(String value) +88
   ASP.Dussehra_Index.Page_Load(Object sender, EventArgs e) in E:\kunden\homepages\28\d380917168\www\Hello-Hyderabad\Festivals\Guides\Vijaya-Dashami\Dussehra-Dates.ascx:19
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   System.Web.UI.Control.LoadRecursive() +134
   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