2004-09-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 13 Sep 2004 02:26:30 +0000 (02:26 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 13 Sep 2004 02:26:30 +0000 (02:26 -0000)
* RadioButton.cs: fix GroupName when the control is inside a
NamingContainer different from Page. Closes bug #65586.

svn path=/branches/mono-1-0/mcs/; revision=33787

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

index aada87a6c2d080f0bba94121e74b11bf49c49d5a..874a1774bcedb14930eb7b38846fd4188a971c67 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * RadioButton.cs: fix GroupName when the control is inside a
+       NamingContainer different from Page. Closes bug #65586.
+
 2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Xml.cs: fixed get_DocumentContent (it was returning "" always!) and
index 27bfa2c99a3f04850467979be72177263463c102..becb19787bcbb1b93a5466045893267e069049a9 100644 (file)
@@ -99,19 +99,23 @@ namespace System.Web.UI.WebControls
                        writer.RenderBeginTag (System.Web.UI.HtmlTextWriterTag.Input);\r
                        writer.RenderEndTag ();\r
                }\r
-\r
-               private string UniqueGroupNamePrivate\r
-               {\r
-                       get {\r
-                               string retVal = GroupName;\r
-                               int unique = UniqueID.LastIndexOf (':');\r
-                               if (unique >= 0)\r
-                                       retVal += UniqueID.Substring (unique + 1);\r
-\r
-                               return retVal;\r
-                       }\r
-               }\r
-\r
+
+               private string UniqueGroupNamePrivate
+               {
+                       get {
+                               string retVal;
+                               string uid = UniqueID;
+                               int unique = uid.LastIndexOf (':');
+                               if (unique == -1) {
+                                       retVal = GroupName;
+                               } else {
+                                       retVal = uid.Substring (0, unique + 1) + GroupName;
+                               }
+
+                               return retVal;
+                       }
+               }
+
                private string ValueAttributePrivate\r
                {\r
                        get {\r