2005-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 1 Dec 2005 01:37:08 +0000 (01:37 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 1 Dec 2005 01:37:08 +0000 (01:37 -0000)
* CheckBox.cs: add possible 'internal' attributes to the input tag. Fix
the 'name' attribute when not aligninng to the right.
* RadioButton.cs: use NameAttribute instead of GroupName when indexing
the collection. Raise the OnCheckedChanged event. Fixes bug #76710.

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

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs

index 842b22ee5f85489313219ef627ff7d8dd202b020..a5b4fc93c6ed579bede7763a8057dc74095ec615 100644 (file)
@@ -1,3 +1,10 @@
+2005-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * CheckBox.cs: add possible 'internal' attributes to the input tag. Fix
+       the 'name' attribute when not aligninng to the right.
+       * RadioButton.cs: use NameAttribute instead of GroupName when indexing
+       the collection. Raise the OnCheckedChanged event. Fixes bug #76710.
+
 2005-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * DataGrid.cs: clear the control collection on every call to
index 033154d946754a954f8dd5e452aee5d2e36533be..57a0a9aa5887c5d83f29458de8212dae220d9644 100644 (file)
@@ -348,6 +348,7 @@ namespace System.Web.UI.WebControls {
                                w.AddAttribute (HtmlTextWriterAttribute.Id, ClientID);
                                w.AddAttribute (HtmlTextWriterAttribute.Type, render_type);
                                w.AddAttribute (HtmlTextWriterAttribute.Name, NameAttribute);
+                               InternalAddAttributesToRender (w);
                                if (Checked)
                                        w.AddAttribute (HtmlTextWriterAttribute.Checked, "checked");
 
@@ -395,7 +396,8 @@ namespace System.Web.UI.WebControls {
 
                                w.AddAttribute (HtmlTextWriterAttribute.Id, ClientID);
                                w.AddAttribute (HtmlTextWriterAttribute.Type, render_type);
-                               w.AddAttribute (HtmlTextWriterAttribute.Name, UniqueID);
+                               w.AddAttribute (HtmlTextWriterAttribute.Name, NameAttribute);
+                               InternalAddAttributesToRender (w);
                                if (Checked)
                                        w.AddAttribute (HtmlTextWriterAttribute.Checked, "checked");
 
@@ -468,7 +470,6 @@ namespace System.Web.UI.WebControls {
 
                internal virtual void InternalAddAttributesToRender (HtmlTextWriter w)
                {
-                       AddAttributesToRender (w);
                }
        }
 }
index a7da72737a295393508806ca0052e518b017ed21..d4dc7276889a5e13b2be54e0c207a7df451b0eef 100644 (file)
@@ -101,7 +101,7 @@ namespace System.Web.UI.WebControls {
                {
                        bool old_checked = Checked;
                        
-                       if (postCollection[GroupName] == postDataKey) {
+                       if (postCollection[NameAttribute] == postDataKey) {
                                Checked = true;
                        } else {
                                Checked = false;
@@ -119,6 +119,7 @@ namespace System.Web.UI.WebControls {
 #endif
                void RaisePostDataChangedEvent ()
                {
+                       OnCheckedChanged (EventArgs.Empty);
                }
 
                bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)