例如:[ArgumentOutOfRangeException: startIndex 不能大于字符串長度。
參數名: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490931
System.String.Substring(Int32 startIndex) +17
WebApplication1._Default.Page_Load(Object sender, EventArgs e) in F:\test\WebApplication1\Default.aspx.cs:19
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 希望哪位大哥給個詳細的解釋,或者給個鏈接,我沒找著相關資料。
1 回答

墨色風雨
TA貢獻1853條經驗 獲得超6個贊
問題應該是出在 Page_Load 函數中。
我判斷你在這個函數中使用了 str.Substring(xxx) ,而這個 xxx 大于了 str.Length-1
- 1 回答
- 0 關注
- 643 瀏覽
添加回答
舉報
0/150
提交
取消