Hi guys, Attached is a patch for everyone's perusal, that fixes a bug in the System.Web.UI.WebControls.ListControl class under the NET-2.0 profile, that specifically shows itself when using a DropDownList or a ListBox control. It appears that modifying the items collection on these controls during a postback (adding/removing items on the fly etc in an event handler) causes a problem during the next loading of the control state.
It's a bit tricky to write a decent test case for a bug in the web side of things, but you can see the problem (at least until I upgrade the Mono classlib on my server to include this fix) at a couple of test pages I knocked up, one for each control - http://apps.eldiablo.co.uk/TestWebApp/dropdownlisttest.aspx, and http://apps.eldiablo.co.uk/TestWebApp/listboxtest.aspx. Attempting to use the buttons on these pages to move items from one dropdown or listbox to another will result in an ArgumentOutOfRangeException. Also attached is these two pages (and codebehind) in an archive for anyone who wants to try the patch, and try the test pages themselves, to ensure the fix works correctly. I've tried the fix against a freshly updated working copy from svn on another development box I've got here, and with these same test pages, the issue goes away. It's a fairly small fix, so I don't imagine any problems, but any comments, let me know :-) Cheers, Elliott
20060124-System.Web.UI.WebControls.ListControl.patch
Description: Binary data
20060124-ListControlTestPages.tar.gz
Description: application/gzip
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list