refactoring: Button, ImageButton and LinkButton are used insted internal DataControlB...
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / RadioButtonList.cs
index ac9c45fb80a35ea3ef36e5f735c7d83e8fe7d087..7a9d711f12b54e07b2c2cd123328b9d0487ceff9 100644 (file)
 using System.Collections;
 using System.ComponentModel;
 using System.Collections.Specialized;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
 
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [ValidationProperty ("SelectedItem")]
+#if NET_2_0
+       [SupportsEventValidation]
+#endif
        public class RadioButtonList : ListControl, IRepeatInfoUser,
                INamingContainer, IPostBackDataHandler {
                bool need_raise;
+               short tabIndex = 0;
 
                public RadioButtonList ()
                {
@@ -244,7 +253,10 @@ namespace System.Web.UI.WebControls {
                        radio.GroupName = UniqueID;
                        radio.Page = Page;
                        radio.Checked = Items [repeatIndex].Selected;
-                       radio.Attributes["Value"] = Items [repeatIndex].Value;
+                       radio.ValueAttribute = Items [repeatIndex].Value;
+                       radio.AutoPostBack = AutoPostBack;
+                       radio.Enabled = Enabled;
+                       radio.TabIndex = tabIndex;
                        radio.RenderControl (writer);
                }
 #if NET_2_0
@@ -311,8 +323,14 @@ namespace System.Web.UI.WebControls {
                        repeat.RepeatColumns = RepeatColumns;
                        repeat.RepeatDirection = RepeatDirection;
                        repeat.RepeatLayout = RepeatLayout;
+
+                       tabIndex = TabIndex;
+                       TabIndex = 0;
+
                        repeat.RenderRepeater (writer, this, ControlStyle, this);
-               }
+
+                       TabIndex = tabIndex;
+               }
        }
 
 }