How about this
base.CreateChildControls();
Controls.Clear();
usercontrol =
(UserControl)Page.LoadControl(@"/ManagedUsercontrolLibrary/WebUserControl1.ascx");
Controls.Add(usercontrol);
Assuming you have a directory called managedusercontrollibrary and an ascx
file in it.
--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:D9**********************************@microsof t.com...
hey all,
let's say i have a WebUserControl that has a GridView in it. i have a
blank
web form on the page and in the code behind i'd like to dynamically create
that WebUserControl could someone please show me a good article or some
syntax to send the concept home for me?
thanks,
rodchar