Kevin,
>I know that Rick Strahl has the stuff on his site for dynamic code evaluation, and was wondering if that's the way to go, or if there's a simpler way.<Nope, no simpler way ... you'll have to use reflection. Check out Rick's stuff ... I think his article has more than you will need if you're simply adding a control (I think he does stuff with getting method names and all, which it doesn't sound like you'll need). You'll basically just need to use the System.Reflection.Assembly.LoadFrom(...) and the .CreateInstance(...). But, anyway, definitely read his article.
~~Bonnie
>I have a situation where I need to dynamically add a container onto a form, where I won't know the name of the container at designtime.
>
>If I knew that the name of my container is UserControl1, I'd be doing something like the following in my form...
>
>UserControl1 oControl = new UserControl1();
>oControl.BringToFront();
>oControl.Refresh();
>
>this.Controls.AddRange(new System.Windows.Forms.Control[] {
> oControl});
>
>
>I'm writing this code as generic code in a form class, so I won't know the name of the container. I know that Rick Strahl has the stuff on his site for dynamic code evaluation, and was wondering if that's the way to go, or if there's a simpler way.
>
>Thanks,
>Kevin