* CheckBoxList.cs: A checkbox will have null post data if it is
authorJackson Harper <jackson@novell.com>
Mon, 1 Dec 2003 03:47:52 +0000 (03:47 -0000)
committerJackson Harper <jackson@novell.com>
Mon, 1 Dec 2003 03:47:52 +0000 (03:47 -0000)
unselected. This fixes bug #51516.

svn path=/trunk/mcs/; revision=20651

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs

index a97ae03790c3f0ff1b9264830512dc580b5e8028..ed3d72613709a3eb13c2092ef4ebe19345df23b4 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-30  Jackson Harper <jackson@ximian.com>
+
+       * CheckBoxList.cs: A checkbox will have null post data if it is
+       unselected. This fixes bug #51516.
+       
 2003-11-29  Jackson Harper <jackson@ximian.com>
 
        * DataGrid.cs: Display paging controls even when there is no
index a080a8ff0929f2d3cdda41ba7556bcb7c343ca87..8c183e103d87b67fea5cd43d7b94ce57014a3452 100644 (file)
@@ -198,10 +198,7 @@ namespace System.Web.UI.WebControls
                        if(index >= 0 && index < Items.Count)
                        {
                                string v = postCollection [postDataKey];
-                               if (v == null)
-                                       return false;
-
-                               bool exists = (v.Trim () != "");
+                               bool exists = (v != null);
                                if(Items[index].Selected != exists)\r
                                {\r
                                        Items[index].Selected = exists;\r