* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web / System.Web.UI / UserControl.cs
index 24666360e75517f9c70fd8de7c85076d08f0a389..bae66d41e82ad1d965ec015b3339fb7099a1f48c 100644 (file)
@@ -203,19 +203,17 @@ namespace System.Web.UI {
                {
                        if (initialized)
                                return;
-                       initialized = true;
                        this.Page = page;
                        InitializeAsUserControlInternal ();
                }
 
-               [MonoTODO]
                internal void InitializeAsUserControlInternal ()
                {
-                       /* XXX make sure this really works - we need a
-                        * test for InitializeAsUserControl to see if
-                        * it throws ArgumentNullException on a null
-                        * @page. */
-                       InitializeAsUserControl (null);
+                       if (initialized)
+                               return;
+                       initialized = true;
+                       WireupAutomaticEvents ();
+                       FrameworkInitialize ();
                }
 
                public string MapPath (string virtualPath)