Selaa lähdekoodia

2005-09-28 Gonzalo Paniagua Javier <[email protected]>

	* Control.cs: fix HasChildViewStates.


svn path=/trunk/mcs/; revision=50924
Gonzalo Paniagua Javier 20 vuotta sitten
vanhempi
sitoutus
d445bca651

+ 4 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,3 +1,7 @@
+2005-09-28 Gonzalo Paniagua Javier <[email protected]>
+
+	* Control.cs: fix HasChildViewStates.
+
 2005-09-27 Gonzalo Paniagua Javier <[email protected]>
 
 	* LosFormatter.cs: when the default ctor is used, MAC is disabled.

+ 8 - 14
mcs/class/System.Web/System.Web.UI/Control.cs

@@ -91,7 +91,6 @@ namespace System.Web.UI
 		string uniqueID;
 		string _userId;
 		ControlCollection _controls;
-		IDictionary _childViewStates;
 		Control _namingContainer;
 		Page _page;
 		Control _parent;
@@ -459,23 +458,18 @@ namespace System.Web.UI
                                 return HttpContext.Current;
                         }
                 }
-                protected EventHandlerList Events //DIT
-                {
-                        get
-                        {
+
+                protected EventHandlerList Events {
+                        get {
                                 if (_events == null)
-                                {
-                                	_events = new EventHandlerList();
-                                }
+                                	_events = new EventHandlerList ();
                                 return _events;
                         }
                 }
-                protected bool HasChildViewState //DIT
-                {
-                        get
-                        {
-                                if (_childViewStates == null) return false;
-                                return true;
+
+                protected bool HasChildViewState {
+                        get {
+				return (pendingVS != null && pendingVS.Count > 0);
                         }
                 }