469,356 Members | 2,618 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

Exception with CheckboxList control

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.LoadPostDat a(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(NameValueCollec tion 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.
Nov 25 '07 #1
0 916

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Egbert | last post: by
reply views Thread by Bryce Budd | last post: by
3 posts views Thread by Robin Day | last post: by
4 posts views Thread by dm_dal | last post: by
3 posts views Thread by I am Sam | last post: by
7 posts views Thread by bienwell | last post: by
4 posts views Thread by Patrick.O.Ige | last post: by
6 posts views Thread by dbuchanan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.