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 43:             for (int i = 0; i < arrDates.Length - 1; i++)
Line 44:             {
Line 45:                 Calendar1.SelectedDates.Add(DateTime.Parse(arrDates[i]));
Line 46:             }
Line 47: 

Source File: d:\sites\www.thebraid.com\www_root\whats-on-tourism.aspx.cs    Line: 45

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2837502
   System.DateTime.Parse(String s) +25
   whats_on.Page_Load(Object sender, EventArgs e) in d:\sites\www.thebraid.com\www_root\whats-on-tourism.aspx.cs:45
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8806; ASP.NET Version:2.0.50727.8762