Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Controls Again
Message
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01397235
Message ID:
01397284
Views:
32
>
>private void _AddPanel(string sKey)
>{
>    UserControl control;
>
>    switch (sKey)
>    {
>        case "ship_items":
>            control = new crlShipItems();
>
>            this.Controls.Add(control);

Try changing this.Controls.Add to:

<pre>
this.Controls.Add((UserControl)control);
You may also need to cast the .Left/Top control (or create another reference to the same object with it already cast to the UserControl type).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform