2003-01-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 10 Jan 2003 01:16:10 +0000 (01:16 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 10 Jan 2003 01:16:10 +0000 (01:16 -0000)
* AspGenerator.cs: fixed a couple of thinkos related to IsSubclassOf.

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

mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
mcs/class/System.Web/System.Web.Compilation/ChangeLog

index 975f917b1d4fb5ab90c8638edabd6782770223a4..748f008d9ce9baa13ffba80537f10419fd8543bd 100644 (file)
@@ -1486,10 +1486,12 @@ class AspGenerator
                NewControlFunction (component.TagID, component.ControlID, component_type,
                                    component.ChildrenKind, component.DefaultPropertyName); 
 
-               if (component_type.IsSubclassOf (typeof (System.Web.UI.UserControl)))
+               if (component_type == typeof (UserControl) ||
+                   component_type.IsSubclassOf (typeof (System.Web.UI.UserControl)))
                        current_function.Append ("\t\t\t__ctrl.InitializeAsUserControl (Page);\n");
 
-               if (component_type.IsSubclassOf (typeof (System.Web.UI.Control)))
+               if (component_type == typeof (Control) ||
+                   component_type.IsSubclassOf (typeof (System.Web.UI.Control)))
                        current_function.AppendFormat ("\t\t\t__ctrl.ID = \"{0}\";\n", component.ControlID);
 
                AddCodeForAttributes (component.ComponentType, component.Attributes);
index 153e20e6c03c85371e9e8591651f769aed3037df..3c0b6c02cf8ac32fb277e839734066a4aac19bea 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * AspGenerator.cs: fixed a couple of thinkos related to IsSubclassOf.
+
 2003-01-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * AspElements.cs: attributes without value lacked a space afterwards.