'/en' 應用程式中發生伺服器錯誤。

字串未被辨認為有效的 DateTime。

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: System.FormatException: 字串未被辨認為有效的 DateTime。

原始程式錯誤:


行 26:         {
行 27:             // Set the start and end time and number of appointments to retrieve.
行 28:             CalendarView cView = new CalendarView(Convert.ToDateTime(Request["sno"]).AddDays(-1), Convert.ToDateTime(Request["sno"]).AddDays(1));
行 29: 
行 30:             //  Limit the properties returned to the appointment's subject, start time, and end time.

原始程式檔: c:\inetpub\wwwroot\NtuaWebSiteEn\calcont.aspx.cs    行: 28

堆疊追蹤:


[FormatException: 字串未被辨認為有效的 DateTime。]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +12836419
   System.Convert.ToDateTime(String value) +88
   calcont.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\NtuaWebSiteEn\calcont.aspx.cs:28
   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


版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4676.0