K
KN
I am getting the following exception in a page while using the Checkboxlist
control. This happens on postback.
startIndex cannot be larger than length of string.
Parameter name: startIndex
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.ArgumentOutOfRangeException: startIndex cannot be
larger than length of string.
Parameter name: startIndex
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[ArgumentOutOfRangeException: startIndex cannot be larger than length of
string.
Parameter name: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length,
Boolean fAlwaysCopy) +2916027
System.Web.UI.WebControls.CheckBoxList.LoadPostData(String postDataKey,
NameValueCollection postCollection) +54
System.Web.UI.WebControls.CheckBoxList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean
fBeforeLoad) +353
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194
The page itself is a content page and page is a subclass of a base web page.
At this point the checkboxlist does not have any items added to it. It
renders fine the first time the page comes up. But the exception is thrown
during postback.
Any help appreciated.
control. This happens on postback.
startIndex cannot be larger than length of string.
Parameter name: startIndex
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.ArgumentOutOfRangeException: startIndex cannot be
larger than length of string.
Parameter name: startIndex
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[ArgumentOutOfRangeException: startIndex cannot be larger than length of
string.
Parameter name: startIndex]
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length,
Boolean fAlwaysCopy) +2916027
System.Web.UI.WebControls.CheckBoxList.LoadPostData(String postDataKey,
NameValueCollection postCollection) +54
System.Web.UI.WebControls.CheckBoxList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +11
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean
fBeforeLoad) +353
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1194
The page itself is a content page and page is a subclass of a base web page.
At this point the checkboxlist does not have any items added to it. It
renders fine the first time the page comes up. But the exception is thrown
during postback.
Any help appreciated.