[Mono-dev] 2.0 LoadControlState error in ListControl using CheckBoxList
Joe Audette
joe_audette at yahoo.com
Mon Jan 2 13:17:52 EST 2006
Hi All,
In continued testing of mojoportal using the 2.0 runtime, I've run into another problem on post back when using a CheckBoxList
System.Exception: Unhandled Exception while processing NeatUpload child request ---> System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
Parameter name: index
2
in <0x00096> System.Collections.ArrayList:get_Item (Int32 index)
in <0x00012> System.Web.UI.WebControls.ListItemCollection:get_Item (Int32 index)
in <0x0010f> System.Web.UI.WebControls.ListControl:LoadControlState (System.Object savedState)
in <0x00141> System.Web.UI.Page:LoadPageControlState (System.Object data)
in <0x0004d> System.Web.UI.Page:LoadPageViewState ()
in <0x0012f> System.Web.UI.Page:InternalProcessRequest ()
in <0x000aa> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext context)--- End of inner exception stack trace ---
in <0x004a3> Brettle.Web.NeatUpload.UploadHttpModule:Application_BeginRequest (System.Object sender, System.EventArgs e)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x0046f> System.Web.HttpApplication+<RunHooks>__0:MoveNext ()
I think this corresponds to this section of ListControl.cs:
#if NET_2_0
protected internal override void LoadControlState (object savedState)
{
object first = null;
ArrayList indices = null;
Pair pair = savedState as Pair;
if (pair != null) {
first = pair.First;
indices = pair.Second as ArrayList;
}
base.LoadControlState (first);
if (indices != null) {
foreach (int index in indices)
Items [index].Selected = true;
}
}
#endif
But I'm not sure what could be wrong.
Any ideas?
Thanks,
Joe
joe_audette [at] yahoo dotcom
http://www.joeaudette.com
http://www.mojoportal.com
More information about the Mono-devel-list
mailing list