From 06bb07d6d09fea45d2b76afb912acadf7e967055 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Thu, 12 Dec 2002 20:54:30 +0000 Subject: [PATCH] forgotten in last commit svn path=/trunk/mcs/; revision=9595 --- mcs/class/System.Web/System.Web.UI/TemplateControl.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs index b589873971e..b0a62bf7def 100755 --- a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs +++ b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs @@ -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); } } } -- 2.25.1