472,352 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

<asp:checkboxlist>

Hi,

For the following form:

<form runat="server">
<asp:checkboxlist id="list" runat="server">
<asp:listitem runat="server" value="Cash" />
<asp:listitem runat="server" value="Check" />
</asp:checkboxlist><br/>
</form>

I get the the attached error message. The same form works with
"asp:radiolist." What am I missing? (This is on W2K3.)

Thanks,
Simon
Length cannot be less than zero. Parameter name: length
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: Length cannot be less
than zero. Parameter name: length

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: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +172

System.Web.UI.WebControls.CheckBoxList.System.Web. UI.IPostBackDataHandler.Lo
adPostData(String postDataKey, NameValueCollection postCollection) +34
System.Web.UI.Page.ProcessPostData(NameValueCollec tion postData, Boolean
fBeforeLoad) +397
System.Web.UI.Page.ProcessRequestMain() +642
Nov 19 '05 #1
2 2282
Try

<asp:checkboxlist id="list" runat="server">
<asp:listitem>Cash</asp:listitem>
<asp:listitem>Check</asp:listitem>
</asp:checkboxlist>

Eliyahu

"Simon Cheng" <si************@hotmail.com> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
Hi,

For the following form:

<form runat="server">
<asp:checkboxlist id="list" runat="server">
<asp:listitem runat="server" value="Cash" />
<asp:listitem runat="server" value="Check" />
</asp:checkboxlist><br/>
</form>

I get the the attached error message. The same form works with
"asp:radiolist." What am I missing? (This is on W2K3.)

Thanks,
Simon
Length cannot be less than zero. Parameter name: length
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: Length cannot be less than zero. Parameter name: length

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: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +172

System.Web.UI.WebControls.CheckBoxList.System.Web. UI.IPostBackDataHandler.Lo adPostData(String postDataKey, NameValueCollection postCollection) +34
System.Web.UI.Page.ProcessPostData(NameValueCollec tion postData, Boolean fBeforeLoad) +397
System.Web.UI.Page.ProcessRequestMain() +642

Nov 19 '05 #2
I re-try it today, and now the following works fine for me:

<form runat="server">
<asp:checkboxlist id="list" runat="server">
<asp:listitem runat="server" value="Cash1" />
<asp:listitem runat="server" value="Check1" />
</asp:checkboxlist><br/>
</form>

I have no clue...
Simon

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
Try

<asp:checkboxlist id="list" runat="server">
<asp:listitem>Cash</asp:listitem>
<asp:listitem>Check</asp:listitem>
</asp:checkboxlist>

Eliyahu

"Simon Cheng" <si************@hotmail.com> wrote in message
news:O6**************@TK2MSFTNGP09.phx.gbl...
Hi,

For the following form:

<form runat="server">
<asp:checkboxlist id="list" runat="server">
<asp:listitem runat="server" value="Cash" />
<asp:listitem runat="server" value="Check" />
</asp:checkboxlist><br/>
</form>

I get the the attached error message. The same form works with
"asp:radiolist." What am I missing? (This is on W2K3.)

Thanks,
Simon
Length cannot be less than zero. Parameter name: length
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: Length cannot be

less
than zero. Parameter name: length

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: Length cannot be less than zero.
Parameter name: length]
System.String.Substring(Int32 startIndex, Int32 length) +172

System.Web.UI.WebControls.CheckBoxList.System.Web. UI.IPostBackDataHandler.Lo
adPostData(String postDataKey, NameValueCollection postCollection) +34
System.Web.UI.Page.ProcessPostData(NameValueCollec tion postData,

Boolean
fBeforeLoad) +397
System.Web.UI.Page.ProcessRequestMain() +642


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ed West | last post by:
Am getting this error with the following code, particularly this line: <%# Check(DataBinder.Eval(Container.DataItem, "broker_id"))%> I am...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.