New test.
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / CheckBoxList.cs
index 76b50706cf5be2861c0407e3b8505966036739ad..463898453173abb1447891695b1e7a53e8588c16 100644 (file)
@@ -238,6 +238,10 @@ namespace System.Web.UI.WebControls {
 #endif
                void RaisePostDataChangedEvent ()
                {
+#if NET_2_0
+                       if (CausesValidation)
+                               Page.Validate (ValidationGroup);
+#endif
                        OnSelectedIndexChanged (EventArgs.Empty);
                }
 
@@ -338,18 +342,13 @@ namespace System.Web.UI.WebControls {
                        check_box.Text = item.Text;
                        check_box.AutoPostBack = AutoPostBack;
                        check_box.Checked = item.Selected;
-
-                       if (!Enabled) {
-                               check_box.Enabled = false;
-                               writer.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled");
-                               writer.RenderBeginTag (HtmlTextWriterTag.Span);
-                       }
-
+                       check_box.TextAlign = TextAlign;
+                       check_box.Enabled = Enabled;
+#if NET_2_0
+                       check_box.ValidationGroup = ValidationGroup;
+                       check_box.CausesValidation = CausesValidation;
+#endif
                        check_box.RenderControl (writer);
-
-                       if (!Enabled) {
-                               writer.RenderEndTag ();
-                       }
                }
 
                void IRepeatInfoUser.RenderItem (ListItemType itemType,