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

並未將物件參考設定為物件的執行個體。

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

例外狀況詳細資訊: System.NullReferenceException: 並未將物件參考設定為物件的執行個體。

原始程式錯誤:


行 91:                 string grades = Util.ApiSchoolSystem(api.Api_Id);
行 92:                 syslb.Text = grades;// (grades.Length > 20) ? grades.Substring(0, 20) + "年級..." : grades + "年級";
行 93:                 if(api.Api_Capture.StartsWith("https://www.youtube.com"))
行 94:                     capture.Text = "<iframe style='margin-left:100px;' width='500px' height='200px' frameborder=0 src='" + api.Api_Capture + "'></iframe>";
行 95:                 else

原始程式檔: d:\appgo\ApiContent.aspx.cs    行: 93

堆疊追蹤:


[NullReferenceException: 並未將物件參考設定為物件的執行個體。]
   ApiContent.BindData() in d:\appgo\ApiContent.aspx.cs:93
   ApiContent.Page_PreRender(Object sender, EventArgs e) in d:\appgo\ApiContent.aspx.cs:31
   System.Web.UI.Control.OnPreRender(EventArgs e) +11728515
   System.Web.UI.Control.PreRenderRecursiveInternal() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3670


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