2006-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlTextArea.cs
index 90714426e0aff26a5bfceb3fa8fb51dee3c95231..29250a2225397106ee67cfa80c20fd2b7388e119 100644 (file)
 using System.ComponentModel;
 using System.Collections.Specialized;
 using System.Globalization;
+using System.Security.Permissions;
 
 namespace System.Web.UI.HtmlControls {
 
+       // CAS
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       // attributes
        [DefaultEvent ("ServerChange")]
        [ValidationProperty ("Value")]
+#if NET_2_0
+       [SupportsEventValidation]
+#endif
        public class HtmlTextArea : HtmlContainerControl, IPostBackDataHandler {
 
                private static readonly object serverChangeEvent = new object ();
@@ -67,7 +75,7 @@ namespace System.Web.UI.HtmlControls {
                [WebSysDescription("")]
                [WebCategory("Behavior")]
                public virtual string Name {
-                       get { return ID; }
+                       get { return UniqueID; }
                        set { ; }
                }
 
@@ -93,8 +101,13 @@ namespace System.Web.UI.HtmlControls {
                [WebSysDescription("")]
                [WebCategory("Appearance")]
                public string Value {
+#if NET_2_0
+                       get { return InnerText; }
+                       set { InnerText = value; }
+#else          
                        get { return InnerHtml; }
                        set { InnerHtml = value; }
+#endif         
                }
 
 
@@ -114,6 +127,10 @@ namespace System.Web.UI.HtmlControls {
                override void OnPreRender (EventArgs e)
                {
                        base.OnPreRender (e);
+
+                       if (Page != null) {
+                               Page.RegisterRequiresPostBack (this);
+                       }
                }
 
                protected virtual void OnServerChange (EventArgs e)