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 380:                //}
Line 381:
Line 382:                DateTime startDate = DateTime.Parse(item2.startDate.ToString());
Line 383:
Line 384:                mStr.AppendFormat("<div class='col-sm-6' style='margin-bottom:40px !important;float:right !important;padding-left:0 !important;'>");

Source File: d:\domains\watsu-israel.co.il\watsu-israel.co.il\wwwroot\CourseCat.aspx.cs    Line: 382

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +12641027
   System.DateTime.Parse(String s) +27
   _CourseCat.FillCourse() in d:\domains\watsu-israel.co.il\watsu-israel.co.il\wwwroot\CourseCat.aspx.cs:382
   _CourseCat.Page_Load(Object sender, EventArgs e) in d:\domains\watsu-israel.co.il\watsu-israel.co.il\wwwroot\CourseCat.aspx.cs:22
   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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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