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

索引和長度必須參考字串中的位置。
參數名稱: length

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

例外狀況詳細資訊: System.ArgumentOutOfRangeException: 索引和長度必須參考字串中的位置。
參數名稱: length

原始程式錯誤:


行 45:             lbDoctorExpertise.Text = HttpUtility.HtmlDecode(UDetails.getDoctorExpertise().Trim());
行 46:             string DoctorCode = HttpUtility.HtmlDecode(UDetails.getDoctorCode().Trim());
行 47:             if (DoctorCode.Substring(0, 2) == "Y9" || DoctorCode.Substring(0, 2) == "y9")
行 48:             {
行 49:                 lbJobTitle.Text = "兼任主治醫師";

原始程式檔: c:\inetpub\wwwroot\Exchange\DoctorIntroNew\aboutDoctorsDet.aspx.cs    行: 47

堆疊追蹤:


[ArgumentOutOfRangeException: 索引和長度必須參考字串中的位置。
參數名稱: length]
   System.String.Substring(Int32 startIndex, Int32 length) +10993503
   DoctorWeb.aboutDoctorsDet.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\Exchange\DoctorIntroNew\aboutDoctorsDet.aspx.cs:47
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772


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