2005-09-20 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Tue, 20 Sep 2005 19:41:00 +0000 (19:41 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Tue, 20 Sep 2005 19:41:00 +0000 (19:41 -0000)
* AccessDataSource.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [ToolboxBitmap] on class.
* AdRotator.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Removed extra Page and ViewState properties.
* BulletedList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* Button.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* Calendar.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* CheckBox.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* CompositeControl.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added new protected RecreateChildControls method.
* DataControlCommands.cs: Added declarative security (LinkDemands) for
Minimal. Added private ctor.
* DataGrid.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Fixed properties for 2.0 (mostly removing
[Bindable]). Added override for TagKey property.
* DataGridColumn.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [UrlProperty] on HeaderImageUrl (2.0).
* DataGridItem.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added IDataItemContainer interface for 2.0.
* DataGridPagerStyle.cs: Added declarative security (LinkDemands) for
Minimal. Remove [Bindable] from 2.0 and add [Localizable].
* DataList.cs: Removed [Load|Save]ControlState methods.
* DropDownList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* EditCommandColumn.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Added missing attributes,
[DefaultValue] and [Localize] for 2.0.
* FontInfo.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Remove [Bindable] and added [RefreshProperties]
for 2.0.
* Login.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Fixed IsStyleEmpty. Removed extra [Themeable] attributes.
* ImageButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* LinkButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* ListBox.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* Literal.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Removed [EditorBrowsable] on CreateControlCollection method.
* LoginStatus.cs: Added missing [Themeable] attributes on properties.
* MenuItemStyle.cs: Changed IsEmpty to public (required to compile -
but will be shown as extra).
* RadioButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* RadioButtonList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* RangeValidator.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added missing [Themeable] attributes.
* RegularExpressionValidator.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Remove [Bindable] from 2.0 and add
[Localizable].
* RoleGroupCollection.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Fixed base class (changed in RC).
Re-implemented CopyTo. Removed some methods.
* Style.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Remove static IsStyleEmpty and ToString (from 2.0). IsEmpty
is now public in 2.0.
* Table.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* TableCell.cs: Fixed PersistenceMode for 2.0.
* TextBox.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* TreeNodeStyle.cs: Changed IsEmpty to public (required to compile -
but will be shown as extra).
* WebControl.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Removed [EditorBrowsable] on ControlStyleCreated
property.

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

35 files changed:
mcs/class/System.Web/System.Web.UI.WebControls/AccessDataSource.cs
mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs
mcs/class/System.Web/System.Web.UI.WebControls/BulletedList.cs
mcs/class/System.Web/System.Web.UI.WebControls/Button.cs
mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
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/CompositeControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlCommands.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataGrid.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataGridColumn.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataGridItem.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataGridPagerStyle.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
mcs/class/System.Web/System.Web.UI.WebControls/EditCommandColumn.cs
mcs/class/System.Web/System.Web.UI.WebControls/FontInfo.cs
mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/Literal.cs
mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
mcs/class/System.Web/System.Web.UI.WebControls/LoginStatus.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemStyle.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
mcs/class/System.Web/System.Web.UI.WebControls/RangeValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/RegularExpressionValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/RoleGroupCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
mcs/class/System.Web/System.Web.UI.WebControls/Table.cs
mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs
mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeStyle.cs
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs

index 8d2e2af9054b754f7a7604201c19c9638b585706..ca11970c73ea08857d08ea2a54ca7bd46ba13d6d 100644 (file)
@@ -4,9 +4,7 @@
 // Authors:
 //   Sanjay Gupta (gsanjay@novell.com)
 //
-// (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 using System.IO;
 using System.ComponentModel;
 using System.Data.Common;
+using System.Drawing;
 using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
        [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DesignerAttribute ("System.Web.UI.Design.WebControls.AccessDataSourceDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-       public class AccessDataSource : SqlDataSource 
-       {
+       [ToolboxBitmap ("")]
+       public class AccessDataSource : SqlDataSource {
+
                string dataFile;
                
                public AccessDataSource () : base ()
index f16cfa008e7bf5035af3984fa1f39679c58011cf..876598b31d39147f383a3379323da288e218a108 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //        Ben Maurer <bmaurer@novell.com>
 //
-// (c) 2005 Novell
+// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 using System.Xml;
 using System.Collections;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DefaultEvent("AdCreated")]
        [DefaultProperty("AdvertisementFile")]
        [Designer("System.Web.UI.Design.WebControls.AdRotatorDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
@@ -269,18 +275,6 @@ namespace System.Web.UI.WebControls {
                                throw new NotImplementedException ();
                        }
                }
-
-               /* listed in corcompare */
-               [MonoTODO]
-               public override Page Page 
-               {
-                       get {
-                               return base.Page;
-                       }
-                       set {
-                               base.Page = value;
-                       }
-               }
 #endif         
                
                [Bindable(true)]
@@ -315,14 +309,6 @@ namespace System.Web.UI.WebControls {
                                return base.TagKey;
                        }
                }
-
-               [MonoTODO]
-               protected override StateBag ViewState 
-               {
-                       get {
-                               return base.ViewState;
-                       }
-               }
 #endif         
        
                protected virtual void OnAdCreated (AdCreatedEventArgs e)
index 00ef9c97a6be3f00b3b81e9b0f77ab0d63f7aba5..9aa60a2f7e08a95f9941c1c0cff48aa97214ca77 100644 (file)
@@ -35,12 +35,18 @@ using System.Text;
 using System.Drawing;
 using System.ComponentModel;
 using System.ComponentModel.Design;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
 
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DesignerAttribute ("System.Web.UI.Design.WebControls.BulletedListDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [DefaultEventAttribute ("Click")]
        [DefaultPropertyAttribute ("BulletStyle")]
+       [SupportsEventValidation]
        public class BulletedList : ListControl, IPostBackEventHandler {
                
                [MonoTODO ("we are missing a new style enum, we should be using it")]
index 48f614f5aebe597922b1e4870ed069b1cdb8fc1b..0c0200f57678ebce752cd34ac5c5b09f08a58eaa 100644 (file)
 
 using System.ComponentModel;
 using System.ComponentModel.Design;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
 
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DefaultEvent ("Click")]
        [DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultProperty ("Text")]
@@ -38,6 +43,7 @@ namespace System.Web.UI.WebControls {
 
 #if NET_2_0
        [ToolboxDataAttribute ("<{0}:Button runat=\"server\" Text=\"Button\"></{0}:Button>")]
+       [SupportsEventValidation]
 #else
        [ToolboxDataAttribute ("<{0}:Button runat=server Text=\"Button\"></{0}:Button>")]
 #endif
index 91d85c9ce6d867547fba9a44d08f4e3638ffebb2..57ed6bcd2113d1121cb28f2437f60e09f5fa4a20 100644 (file)
@@ -33,14 +33,20 @@ using System.Globalization;
 using System.Collections;
 using System.ComponentModel;
 using System.Drawing;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DataBindingHandler("System.Web.UI.Design.WebControls.CalendarDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultEvent("SelectionChanged")]
        [DefaultProperty("SelectedDate")]
        [Designer("System.Web.UI.Design.WebControls.CalendarDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
 #if NET_2_0
        [ControlValueProperty ("SelectedDate", "1/1/0001 12:00:00 AM")]
+       [SupportsEventValidation]
 #endif         
        public class Calendar : WebControl, IPostBackEventHandler {
 
index 3908c864f266aeb17724ca4f76232b6daf53d878..07493188308fa11aa48d72328926ed0843eeeeeb 100644 (file)
@@ -1,3 +1,78 @@
+2005-09-20  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * AccessDataSource.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [ToolboxBitmap] on class.
+       * AdRotator.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Removed extra Page and ViewState properties.
+       * BulletedList.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * Button.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * Calendar.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * CheckBox.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * CompositeControl.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added new protected RecreateChildControls method.
+       * DataControlCommands.cs: Added declarative security (LinkDemands) for 
+       Minimal. Added private ctor.
+       * DataGrid.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Fixed properties for 2.0 (mostly removing 
+       [Bindable]). Added override for TagKey property.
+       * DataGridColumn.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [UrlProperty] on HeaderImageUrl (2.0).
+       * DataGridItem.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added IDataItemContainer interface for 2.0.
+       * DataGridPagerStyle.cs: Added declarative security (LinkDemands) for 
+       Minimal. Remove [Bindable] from 2.0 and add [Localizable].
+       * DataList.cs: Removed [Load|Save]ControlState methods.
+       * DropDownList.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * EditCommandColumn.cs: Added declarative security (Link and 
+       Inheritance demands) for Minimal. Added missing attributes, 
+       [DefaultValue] and [Localize] for 2.0.
+       * FontInfo.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Remove [Bindable] and added [RefreshProperties] 
+       for 2.0.
+       * Login.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Fixed IsStyleEmpty. Removed extra [Themeable] attributes.
+       * ImageButton.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * LinkButton.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * ListBox.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * Literal.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Removed [EditorBrowsable] on CreateControlCollection method.
+       * LoginStatus.cs: Added missing [Themeable] attributes on properties.
+       * MenuItemStyle.cs: Changed IsEmpty to public (required to compile - 
+       but will be shown as extra).
+       * RadioButton.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * RadioButtonList.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * RangeValidator.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Added missing [Themeable] attributes.
+       * RegularExpressionValidator.cs: Added declarative security (Link and 
+       Inheritance demands) for Minimal. Remove [Bindable] from 2.0 and add 
+       [Localizable].
+       * RoleGroupCollection.cs: Added declarative security (Link and 
+       Inheritance demands) for Minimal. Fixed base class (changed in RC). 
+       Re-implemented CopyTo. Removed some methods.
+       * Style.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Remove static IsStyleEmpty and ToString (from 2.0). IsEmpty
+       is now public in 2.0.
+       * Table.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * TableCell.cs: Fixed PersistenceMode for 2.0.
+       * TextBox.cs: Added declarative security (Link and Inheritance demands) 
+       for Minimal. Added [SupportsEventValidation] on class (2.0).
+       * TreeNodeStyle.cs: Changed IsEmpty to public (required to compile - 
+       but will be shown as extra).
+       * WebControl.cs: Added declarative security (Link and Inheritance 
+       demands) for Minimal. Removed [EditorBrowsable] on ControlStyleCreated 
+       property.
+
 2005-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * TableStyle.cs: fixed typo that prevented restoring GridLines from
index c85b3eeb9ed0cf555e8e860e8695673ce05ca2c7..1bebb7e08f9f46530304c061dd78c96dab6533be 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Web.UI;
 using System.Collections.Specialized;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Designer ("System.Web.UI.Design.WebControls.CheckBoxDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultEvent ("CheckedChanged")]
        [DefaultProperty ("Text")]
 #if NET_2_0
        [ControlValueProperty ("Checked", null)]
+       [SupportsEventValidation]
 #endif         
        public class CheckBox : WebControl, IPostBackDataHandler
 #if NET_2_0
index a46a79ad9cbfd6626dfdc960cb77187f248655f4..e1145dcb2f38a3f371fad9d1764ba48ee246b2dc 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NET_2_0
+
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
 
-#if NET_2_0
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Designer ("System.Web.UI.Design.WebControls.CompositeControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        public abstract class CompositeControl : WebControl, INamingContainer, ICompositeControlDesignerAccessor {
 
@@ -61,6 +67,14 @@ namespace System.Web.UI.WebControls {
                         * the recreation of our children. */
                        CreateChildControls ();
                }
+
+               [MonoTODO("not sure exactly what this one does..")]
+               protected virtual void RecreateChildControls ()
+               {
+                       /* for now just call CreateChildControls to force
+                        * the recreation of our children. */
+                       CreateChildControls ();
+               }
        
                public override ControlCollection Controls {
                        get {
@@ -71,6 +85,6 @@ namespace System.Web.UI.WebControls {
                        }
                }
        }
-#endif
-
 }
+
+#endif
index f3ee9c5b1f3f4829b8424879d8dbffe1f0bdc9f9..159fb043ad074ccf28d5ee9a907876bd0c5c098b 100644 (file)
 //
 
 #if NET_2_0
-using System.Web.UI;
+using System.Security.Permissions;
 
-namespace System.Web.UI.WebControls
-{
+namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public sealed class DataControlCommands
        {
                public const string CancelCommandName = "Cancel";\r
@@ -47,7 +49,11 @@ namespace System.Web.UI.WebControls
                public const string PreviousPageCommandArgument = "Prev";\r
                public const string SelectCommandName = "Select";\r
                public const string SortCommandName = "Sort";\r
-               public const string UpdateCommandName = "Update";\r
+               public const string UpdateCommandName = "Update";
+
+               private DataControlCommands ()
+               {
+               }\r
        }
 }
 #endif
index a5e4afbbb04a98bac440c77e104a7cf1cd484509..0b755710e5ba8efc5996db39dc5d426cef0147bc 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Web.Util;
 using System.Collections;
 using System.Globalization;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Editor("System.Web.UI.Design.WebControls.DataGridComponentEditor, " + Consts.AssemblySystem_Design, typeof(System.ComponentModel.ComponentEditor))]
        [Designer("System.Web.UI.Design.WebControls.DataGridDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        public class DataGrid : BaseDataList, INamingContainer {
@@ -114,7 +119,11 @@ namespace System.Web.UI.WebControls {
                        set { ViewState ["AutoGenerateColumns"] = value; }
                }
 
+#if NET_2_0
+               [UrlProperty]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("")]
                [Editor("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, typeof(System.Drawing.Design.UITypeEditor))]
                [WebSysDescription ("")]
@@ -124,8 +133,9 @@ namespace System.Web.UI.WebControls {
                        set { TableStyle.BackImageUrl = value; }
                }
 
-               
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [Browsable(false)]
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
                [WebSysDescription ("")]
@@ -388,7 +398,9 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [WebSysDescription ("")]
                [WebCategory ("Appearance")]
@@ -397,7 +409,9 @@ namespace System.Web.UI.WebControls {
                        set { ViewState ["ShowFooter"] = value; }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(true)]
                [WebSysDescription ("")]
                [WebCategory ("Appearance")]
@@ -419,6 +433,13 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [MonoTODO ("why override ?")]
+               protected override HtmlTextWriterTag TagKey {
+                       get { return base.TagKey; }
+               }
+#endif
+
                private TableStyle TableStyle {
                        get { return (TableStyle) ControlStyle; }
                }
index 49a4d26f35222ceb0a77f044ee099f44f96fd7f1..9c619861741204b2f3f24194f2f4328ee689ab75 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Web.UI;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [TypeConverter (typeof (System.ComponentModel.ExpandableObjectConverter))]
        public abstract class DataGridColumn : IStateManager
        {
@@ -84,6 +89,9 @@ namespace System.Web.UI.WebControls {
                [DefaultValue ("")]
                [WebSysDescription ("")]
                [WebCategory ("Misc")]
+#if NET_2_0
+               [UrlProperty]
+#endif
                public virtual string HeaderImageUrl
                {
                        get {
index 1be5fdfbb529e2b62d091cb168917ec45be6c79d..ae3134a4cd8765b432a0a1c28df1d22bdc28934c 100644 (file)
 //
 
 using System.ComponentModel;
-using System.Web.UI;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+#if NET_2_0
+       public class DataGridItem : TableRow, INamingContainer, IDataItemContainer {
+#else
        public class DataGridItem : TableRow, INamingContainer {
+#endif
                #region Fields
                private object          item;
                private int             dataset_index;
@@ -74,6 +82,22 @@ namespace System.Web.UI.WebControls {
                }
                #endregion      // Public Instance Properties
 
+#if NET_2_0
+               #region IDataItemContainer Properties
+               object IDataItemContainer.DataItem {
+                       get { return item; }
+               }
+
+               int IDataItemContainer.DataItemIndex{
+                       get { return item_index; }
+               }
+
+               int IDataItemContainer.DisplayIndex{
+                       get { return item_index; }
+               }
+               #endregion      // IDataItemContainer Properties
+#endif
+
                #region Public Instance Methods
                protected override bool OnBubbleEvent(object source, EventArgs args) {
                        // Nikhil Kothari, pg 312-313:
index ccd96e3e9e0783d988b0a9dee858e0ef84148faf..7c5f983cb317f50bc69d1856f528194dc968b6b9 100644 (file)
 //
 
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS - no inheritance demand required because the class is sealed
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public sealed class DataGridPagerStyle : TableItemStyle {
                #region Constructors
                internal DataGridPagerStyle () {
@@ -34,7 +38,9 @@ namespace System.Web.UI.WebControls {
                #endregion      // Constructors
 
                #region Public Instance Properties
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(PagerMode.NextPrev)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -54,7 +60,11 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [Localizable (true)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("&gt;")]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -74,7 +84,9 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(10)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -98,7 +110,9 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(PagerPosition.Bottom)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -118,7 +132,11 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [Localizable (true)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("&lt;")]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -138,7 +156,9 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(true)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
index 40af2d083de91c444be217c0678d39a82c0747f2..6b0aa304ea046e5c834b01bc514279fa75f8f0bf 100644 (file)
@@ -644,46 +644,7 @@ namespace System.Web.UI.WebControls {
                        if (state [7] != null)
                                FooterStyle.LoadViewState (state [7]);
                }
-#if NET_2_0
-               protected internal override void LoadControlState (object savedState)
-               {
-                       // FIXME: what's in Triplet.First ?
-                       // ??? maybe a some space for base.LoadControlState ???
-                       if (savedState == null) {
-                               // reset to default values
-                               editIndex = -1;
-                               selectedIndex = -1;
-                       } else {
-                               Triplet t = (Triplet) savedState;
-                               if (t.Second == null) {
-                                       editIndex = -1;
-                               } else {
-                                       editIndex = (int) t.Second;
-                               }
-                               if (t.Third == null) {
-                                       selectedIndex = -1;
-                               } else {
-                                       selectedIndex = (int) t.Third;
-                               }
-                       }
-               }
 
-               protected internal override object SaveControlState ()
-               {
-                       bool e = (editIndex == -1);
-                       bool s = (selectedIndex == -1);
-                       if (e && s)
-                               return null;
-
-                       Triplet t = new Triplet ();
-                       if (!e)
-                               t.Second = editIndex;
-                       if (!s)
-                               t.Third = selectedIndex;
-                       
-                       return (object) t;
-               }
-#endif
                protected override bool OnBubbleEvent (object source, EventArgs e)
                {
                        DataListCommandEventArgs dlca = (e as DataListCommandEventArgs);
index 3536988a55d9c2a3345151caeb222bfebb63931f..00df3a214e4e8599b3b711deee4e825c546f0cc2 100644 (file)
 //
 //
 
-using System;
 using System.Collections.Specialized;
 using System.ComponentModel;
 using System.Drawing;
-using System.Web;
-using System.Web.UI;
+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 DropDownList : ListControl, IPostBackDataHandler {
                #region Public Constructors
                public DropDownList() {
index b0c7ea9979f408d4c3cf402fd70129b97e11aa56..263d216929133fc2f843714e462b3a65535a8dbe 100644 (file)
 //
 //
 
-using System;
-using System.Web.UI;
+using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public class EditCommandColumn : DataGridColumn {
                #region Public Constructors
                public EditCommandColumn() {
@@ -51,6 +55,10 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [DefaultValue ("")]
+               [Localizable (true)]
+#endif
                public virtual string CancelText {
                        get {
                                return ViewState.GetString("CancelText", string.Empty);
@@ -61,6 +69,10 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [DefaultValue ("")]
+               [Localizable (true)]
+#endif
                public virtual string EditText {
                        get {
                                return ViewState.GetString("EditText", string.Empty);
@@ -71,6 +83,10 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [DefaultValue ("")]
+               [Localizable (true)]
+#endif
                public virtual string UpdateText {
                        get {
                                return ViewState.GetString("UpdateText", string.Empty);
index 4e53260905af6318820dbdca666599f398b8cd0d..0e22e00ce3ce771ee4538d6526d3c68322b98eaf 100644 (file)
 //
 
 using System.ComponentModel;
+using System.Security.Permissions;
 
-namespace System.Web.UI.WebControls 
-{
+namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
        public sealed class FontInfo 
        {
                [Flags]
-                       internal enum FontStyles 
+               internal enum FontStyles 
                {
                        None            = 0,
                        Bold            = 0x0001,
@@ -62,7 +67,9 @@ namespace System.Web.UI.WebControls
                #endregion      // Constructors
 
                #region Public Instance Properties
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -86,7 +93,9 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -110,7 +119,11 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if NET_2_0
+               [RefreshProperties (RefreshProperties.Repaint)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("")]
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
                [Editor("System.Drawing.Design.FontNameEditor, " + Consts.AssemblySystem_Drawing_Design, typeof(System.Drawing.Design.UITypeEditor))]
@@ -155,6 +168,9 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if NET_2_0
+               [RefreshProperties (RefreshProperties.Repaint)]
+#endif
                [Editor("System.Windows.Forms.Design.StringArrayEditor, " + Consts.AssemblySystem_Design, typeof (System.Drawing.Design.UITypeEditor))]
                [NotifyParentProperty(true)]
                [TypeConverter(typeof(System.Web.UI.WebControls.FontNamesConverter))]
@@ -186,7 +202,9 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -210,7 +228,11 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if NET_2_0
+               [RefreshProperties (RefreshProperties.Repaint)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue(typeof (FontUnit), "")]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -238,7 +260,9 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
@@ -262,7 +286,9 @@ namespace System.Web.UI.WebControls
                        }
                }
 
+#if ONLY_1_1
                [Bindable(true)]
+#endif
                [DefaultValue(false)]
                [NotifyParentProperty(true)]
                [WebSysDescription ("")]
index 0a473f044939d737e48f3f8fe423ee3fd13a5763..f1d969581d0202a75dffee6be2b83f193bb252ef 100644 (file)
 
 using System.Collections.Specialized;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DefaultEvent("Click")]
 #if NET_2_0
        [Designer ("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-#endif         
-       public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler
-#if NET_2_0
-       , IButtonControl
-#endif 
-       {
-
+       [SupportsEventValidation]
+       public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler, IButtonControl {
+#else
+       public class ImageButton : Image, IPostBackDataHandler, IPostBackEventHandler {
+#endif
                private static readonly object ClickEvent = new object ();
                private static readonly object CommandEvent = new object ();
                private int pos_x, pos_y;
index e44bcc469567fed44363c6d18cb5af238b7fcd52..7cbb45aea82ee458d61451a45b3aaee94cd4ba5a 100644 (file)
 //
 
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [ControlBuilder(typeof(LinkButtonControlBuilder))]
        [DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultEvent("Click")]
@@ -36,6 +42,7 @@ namespace System.Web.UI.WebControls {
        [Designer("System.Web.UI.Design.WebControls.LinkButtonDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [ParseChildren(false)]
 #if NET_2_0
+       [SupportsEventValidation]
        [ToolboxData("<{0}:LinkButton runat=\"server\">LinkButton</{0}:LinkButton>")]
 #else          
        [ToolboxData("<{0}:LinkButton runat=server>LinkButton</{0}:LinkButton>")]
index 7910628267652543ad476d03b5f55acd96f50147..5bed12e122d6de1fd992c425a2210364f44eea7f 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.ComponentModel;
 using System.Drawing;
 using System.Globalization;
 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 ListBox : ListControl, IPostBackDataHandler {
 
                public ListBox ()
index 9d81f5f91275d587fc572786d9711ab2ace81c94..1e5eebf5a53987eaa29408088b4cf267865b34b2 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.ComponentModel;
-using System.Web.UI;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [ControlBuilder(typeof(LiteralControlBuilder))]
        [DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultProperty("Text")]
@@ -91,9 +95,6 @@ namespace System.Web.UI.WebControls {
                }
 #endif         
 
-#if NET_2_0
-               [EditorBrowsable (EditorBrowsableState.Never)]
-#endif         
                protected override ControlCollection CreateControlCollection ()
                {
                        return new EmptyControlCollection (this);
index 55d573f4da41d79057d5b0e06e48c68bb2915a26..ad2741f70df1c73a51096ceed01997beca1008bf 100644 (file)
@@ -140,7 +140,6 @@ namespace System.Web.UI.WebControls {
 
                [DefaultValue ("")]
                [Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
-               [Themeable (false)]
                [UrlProperty]
                public virtual string CreateUserUrl {
                        get {
@@ -1221,7 +1220,9 @@ namespace System.Web.UI.WebControls {
 
                private bool IsEmpty (Style style)
                {
-                       return System.Web.UI.WebControls.Style.IsStyleEmpty (style);
+                       if (style == null)
+                               return true;
+                       return style.IsEmpty;
                }
 
                private bool IsDefaultLoginPage ()
index 90cbdbf68c1229885bc94742e9aae73b4a2707f2..94c1990f726b120d5c2f7a187d46709fcfb6a493 100644 (file)
@@ -89,6 +89,7 @@ namespace System.Web.UI.WebControls {
                }
 
                [DefaultValue (LogoutAction.Refresh)]
+               [Themeable (false)]
                public virtual LogoutAction LogoutAction {
                        get {
                                object o = ViewState ["LogoutAction"];
@@ -120,6 +121,7 @@ namespace System.Web.UI.WebControls {
 
                [DefaultValue ("")]
                [Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+               [Themeable (false)]
                [UrlProperty]
                public virtual string LogoutPageUrl {
                        get {
index 0951327600769acae72f8beadb209f63e538c0d9..6e2c9a1865b18a05b86b4af24f9c784c0274f5ef 100644 (file)
@@ -86,7 +86,8 @@ namespace System.Web.UI.WebControls
                        }
                }
 
-               protected internal override bool IsEmpty {
+               // FIXME: shouldn't be part of the public API
+               public override bool IsEmpty {
                        get {
                                return base.IsEmpty && 
                                       !IsSet(HORZ_PADD) &&
index da7c0ce32e9546085577f7aef823d68be59025ba..908247bde571900599ef4bc2a2eecec1a36ea95a 100644 (file)
 
 using System.Collections.Specialized;
 using System.ComponentModel;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [Designer ("System.Web.UI.Design.WebControls.CheckBoxDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
+#if NET_2_0
+       [SupportsEventValidation]
+#endif
        public class RadioButton : CheckBox , IPostBackDataHandler
        {
                public RadioButton () : base ("radio")
index ac9c45fb80a35ea3ef36e5f735c7d83e8fe7d087..cb77e457756013505160040ce5c4372f93b3ec9b 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;
index 31bb1729de0711d5922065f6d8822be5eecf8b1c..7171df51e0d430999f7684872fc98435762555fb 100644 (file)
 //
 //
 
-using System;
 using System.ComponentModel;
 using System.Globalization;
+using System.Security.Permissions;
 
 // Modeled after Nikhil Kothari's sample in "ASP Server Controls and Components", pp368
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
 #if NET_2_0
        [ToolboxData("<{0}:RangeValidator runat=\"server\" ErrorMessage=\"RangeValidator\"></{0}:RangeValidator>")]
 #else
@@ -43,7 +48,11 @@ namespace System.Web.UI.WebControls {
                #endregion      // Public Constructors
 
                #region Public Instance Properties
+#if NET_2_0
+               [Themeable (false)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
@@ -57,7 +66,11 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
+#if NET_2_0
+               [Themeable (false)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue("")]
                [WebSysDescription ("")]
                [WebCategory ("Behavior")]
index faa5b736f4e28b6f3d0d2a2a06233e5788dd62b5..9e20e47a1f377e63f2edbbad008db051520a6000 100644 (file)
@@ -30,8 +30,14 @@ using System.ComponentModel;
 using System.Web;
 using System.Web.UI.WebControls;
 using System.Text.RegularExpressions;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
 #if NET_2_0
        [ToolboxData ("<{0}:RegularExpressionValidator runat=\"server\" ErrorMessage=\"RegularExpressionValidator\"></{0}:RegularExpressionValidator>")]
 #else
@@ -62,7 +68,11 @@ namespace System.Web.UI.WebControls {
                        return Regex.IsMatch (GetControlValidationValue(ControlToValidate), ValidationExpression);
                }
 
+#if NET_2_0
+               [Themeable (false)]
+#else
                [Bindable(true)]
+#endif
                [DefaultValue ("")]
                [Editor ("System.Web.UI.Design.WebControls.RegexTypeEditor, " + Consts.AssemblySystem_Design, typeof(System.Drawing.Design.UITypeEditor))]
                [WebSysDescription ("")]
index c5da8e602cd4b5e413205de74ef061dde9bfed2e..093c37203762de54be04b4e80d7976db75d4b7f4 100644 (file)
@@ -39,7 +39,7 @@ namespace System.Web.UI.WebControls {
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        // attributes
        [Editor ("System.Web.UI.Design.WebControls.RoleGroupCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
-       public sealed class RoleGroupCollection : StateManagedCollection {
+       public sealed class RoleGroupCollection : CollectionBase {
 
                public RoleGroupCollection ()
                {
@@ -63,12 +63,15 @@ namespace System.Web.UI.WebControls {
 
                public void CopyTo (RoleGroup[] array, int index)
                {
-                       base.CopyTo (array, index);
-               }
-
-               protected override object CreateKnownType (int index)
-               {
-                       return new RoleGroup ();
+                       if (array == null)
+                               throw new ArgumentNullException ("array");
+                       if (index < 0)
+                               throw new ArgumentException (Locale.GetText ("Negative index."), "index");
+                       if (this.Count <= array.Length - index)
+                               throw new ArgumentException (Locale.GetText ("Destination isn't large enough to copy collection."), "array");
+
+                       for (int i=0; i < Count; i++)
+                               array [i + index] = this [i];
                }
 
                public RoleGroup GetMatchingRoleGroup (IPrincipal user)
@@ -104,11 +107,6 @@ namespace System.Web.UI.WebControls {
                public void OnValidate (object sender)
                {
                }
-
-               [MonoTODO]
-               protected override void SetDirtyObject (object o)
-               {
-               }
        }
 }
 
index a0dc409f8294d331255f9362f18afba09fa332e7..6315afab19a1f5eec1913592796ae15875c3f7ef 100644 (file)
 //
 //
 
-using System;
 using System.ComponentModel;
 using System.Drawing;
+using System.Security.Permissions;
 
-namespace System.Web.UI.WebControls 
-{
+namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
 #if NET_2_0
 // Not until we actually have StyleConverter
 //     [TypeConverter(typeof(System.Web.UI.WebControls.StyleConverter))]
@@ -342,7 +346,13 @@ namespace System.Web.UI.WebControls
                #endregion      // Public Instance Properties
 
                #region Protected Instance Properties
+#if NET_2_0
+               [Browsable (false)]
+               [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+               public virtual bool IsEmpty 
+#else
                protected internal virtual bool IsEmpty 
+#endif
                {
                        get 
                        {
@@ -606,11 +616,12 @@ namespace System.Web.UI.WebControls
                        }
                        styles = Styles.None;
                }
-
+#if ONLY_1_1
                public override string ToString() 
                {
                        return string.Empty;
                }
+#endif
                #endregion      // Public Instance Methods
 
                #region Protected Instance Methods
@@ -756,14 +767,6 @@ namespace System.Web.UI.WebControls
                        if (viewstate != null)
                                viewstate.SetDirty (true);
                }
-
-               public static bool IsStyleEmpty (Style s)
-               {
-                       if (s == null)
-                               return true;
-                       return s.IsEmpty;
-               }
-
 #endif
        }
 }
index 09f77493f54f9487e008b54c2a2cd37acd9bc35d..852177ab9b6bf27ec71f210b326aa55ac84d8721 100644 (file)
@@ -39,6 +39,7 @@ namespace System.Web.UI.WebControls {
        [Designer ("System.Web.UI.Design.WebControls.TableDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [ParseChildren (true, "Rows")]
 #if NET_2_0
+       [SupportsEventValidation]
        public class Table : WebControl, IPostBackEventHandler {
 #else
        public class Table : WebControl {
index 3773747dea707192e69bc8fa012cd787af4e4994..3af786b4a0955573b0027dbb3cd6bed698997b78 100644 (file)
@@ -136,7 +136,7 @@ namespace System.Web.UI.WebControls {
 
 #if NET_2_0
                [Localizable (true)]
-               [PersistenceMode (PersistenceMode.EncodedInnerDefaultProperty)]
+               [PersistenceMode (PersistenceMode.InnerDefaultProperty)]
 #else
                [Bindable (true)]
 #endif
index f91ff3b6ca198dd45c641b40136a806ea9e018d4..e13104592d61c6f743b24ce7609f3bd213ca4086 100644 (file)
 
 using System.Collections.Specialized;
 using System.ComponentModel;
-
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DataBindingHandler ("System.Web.UI.Design.TextDataBindingHandler, " + Consts.AssemblySystem_Design)]
        [DefaultEvent ("TextChanged")]
        [DefaultProperty ("Text")]
@@ -40,6 +45,7 @@ namespace System.Web.UI.WebControls {
        [Designer ("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
        [ParseChildren (true, "Text")]
        [ControlValueProperty ("Text", null)]
+       [SupportsEventValidation]
 #else
        [ParseChildren (false)]
 #endif         
index 2a57d8de730f2a8eb7dc64d8b985fd30dcce1b94..2e4edfc20cc53bc4dbf46fe553c7bdf824422217 100644 (file)
@@ -108,7 +108,8 @@ namespace System.Web.UI.WebControls
                        }
                }
 
-               protected internal override bool IsEmpty {
+               // FIXME: shouldn't be part of the public API
+               public override bool IsEmpty {
                        get {
                                return (base.IsEmpty &&
                                        !IsSet (CHILD_PADD) &&
index b1381ecb1f5032412446b8b5694a04b5d073e319..850015d346af60cb0b5820f0a3dd204e2328bfd1 100644 (file)
 
 using System.ComponentModel;
 using System.Drawing;
+using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls {
+
+       // CAS
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
 #if NET_2_0
        [PersistChildrenAttribute (false, false)]
        [ParseChildrenAttribute (true, ChildControlType = typeof(Control))]
@@ -193,6 +199,9 @@ namespace System.Web.UI.WebControls {
 
                [Browsable(false)]
                [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+#if NET_2_0
+               [EditorBrowsable (EditorBrowsableState.Never)]
+#endif
                public bool ControlStyleCreated {
                        get {
                                return style != null;