diff options
author | Marek Habersack <grendel@twistedcode.net> | 2010-04-03 04:25:13 +0400 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2010-04-03 04:25:13 +0400 |
commit | dd0fe784188aa905c47fce355f2a8573dc5a8c6a (patch) | |
tree | c831c34026eb2e1b7547506746938da74ac0f67f /mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs | |
parent | b1bbc5ad14d35acbf6f68fa8139533d8634e899e (diff) |
Removed another batch of pre 2.0 code + some cosmetics
svn path=/trunk/mcs/; revision=154746
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs index 6afdb8bbe65..ba4057b17a0 100644 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTextArea.cs @@ -4,7 +4,7 @@ // Author: // Sebastien Pouliot <sebastien@ximian.com> // -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) +// Copyright (C) 2005-2010 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 @@ -32,17 +32,15 @@ using System.Globalization; using System.Security.Permissions; using System.Web.Util; -namespace System.Web.UI.HtmlControls { - +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 { static readonly object serverChangeEvent = new object (); @@ -52,7 +50,6 @@ namespace System.Web.UI.HtmlControls { { } - [DefaultValue ("")] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] [WebSysDescription("")] @@ -114,20 +111,14 @@ namespace System.Web.UI.HtmlControls { base.AddParsedSubObject (obj); } -#if NET_2_0 - protected internal -#else - protected -#endif - override void OnPreRender (EventArgs e) + protected internal override void OnPreRender (EventArgs e) { base.OnPreRender (e); - if (Page != null && !Disabled) { - Page.RegisterRequiresPostBack (this); -#if NET_2_0 - Page.RegisterEnabledControl (this); -#endif + Page page = Page; + if (page != null && !Disabled) { + page.RegisterRequiresPostBack (this); + page.RegisterEnabledControl (this); } } @@ -140,17 +131,15 @@ namespace System.Web.UI.HtmlControls { protected override void RenderAttributes (HtmlTextWriter writer) { -#if NET_2_0 - if (Page != null) - Page.ClientScript.RegisterForEventValidation (UniqueID); -#endif - if (Attributes ["name"] == null) { + Page page = Page; + if (page != null) + page.ClientScript.RegisterForEventValidation (UniqueID); + + if (Attributes ["name"] == null) writer.WriteAttribute ("name", Name); - } base.RenderAttributes (writer); } -#if NET_2_0 protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection) { return DefaultLoadPostData (postDataKey, postCollection); @@ -161,7 +150,6 @@ namespace System.Web.UI.HtmlControls { ValidateEvent (UniqueID, String.Empty); OnServerChange (EventArgs.Empty); } -#endif internal bool DefaultLoadPostData (string postDataKey, NameValueCollection postCollection) { @@ -175,23 +163,14 @@ namespace System.Web.UI.HtmlControls { bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection) { -#if NET_2_0 return LoadPostData (postDataKey, postCollection); -#else - return DefaultLoadPostData (postDataKey, postCollection); -#endif } void IPostBackDataHandler.RaisePostDataChangedEvent () { -#if NET_2_0 RaisePostDataChangedEvent (); -#else - OnServerChange (EventArgs.Empty); -#endif } - [WebSysDescription("")] [WebCategory("Action")] public event EventHandler ServerChange { |