Merge pull request #2916 from ludovic-henry/fix-40306
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / CheckBoxList.cs
index 2efde6a67ae3c9249ad74d76e7cadc886fab94cc..7cb9ba78c5704999c099f4c0d4232665d6f53bd0 100644 (file)
@@ -95,11 +95,7 @@ namespace System.Web.UI.WebControls
                        get { return (RepeatLayout) ViewState.GetInt ("RepeatLayout", (int) RepeatLayout.Table); }
                        set {
                                bool outOfRange;
-#if NET_4_0
                                outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
-#else
-                               outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
-#endif
                                if (outOfRange)
                                        throw new ArgumentOutOfRangeException ("value");
                                ViewState ["RepeatLayout"] = value;
@@ -298,14 +294,12 @@ namespace System.Web.UI.WebControls
                                check_box.Attributes.Clear ();
                        if (item.HasAttributes)
                                check_box.Attributes.CopyFrom (item.Attributes);
-#if NET_4_0
                        if (!RenderingCompatibilityLessThan40) {
                                var attrs = check_box.InputAttributes;
                        
                                attrs.Clear ();
                                attrs.Add ("value", item.Value);
                        }
-#endif
                        check_box.RenderControl (writer);
                }
 
@@ -314,11 +308,9 @@ namespace System.Web.UI.WebControls
                        RenderItem (itemType, repeatIndex, repeatInfo, writer);
                }
 
-               protected internal override void VerifyMultiSelect()
+               internal override bool MultiSelectOk ()
                {
-                       //by default the ListControl will throw an exception in this method,
-                       //therefor we should override the method if the class is supporting
-                       //MultiSelect option.
+                       return true;
                }
        }
 }