forgotten in last commit
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 12 Dec 2002 20:54:30 +0000 (20:54 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 12 Dec 2002 20:54:30 +0000 (20:54 -0000)
svn path=/trunk/mcs/; revision=9595

mcs/class/System.Web/System.Web.UI/TemplateControl.cs

index b589873971e3a9d2961b076d5b4432a82b4e6d98..b0a62bf7def4f5d673cef213999ed4834f8cbeeb 100755 (executable)
@@ -164,8 +164,9 @@ namespace System.Web.UI {
 
                        public void InstantiateIn (Control control)
                        {
-                               object template = Activator.CreateInstance (type);
-                               control.Controls.Add ((Control) template);
+                               Control template = Activator.CreateInstance (type) as Control;
+                               template.SetBindingContainer (false);
+                               control.Controls.Add (template);
                        }
                }
        }