Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Controls Again
Message
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01397235
Message ID:
01397284
Vues:
33
>
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform