Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching UserControl at runtime
Message
From
28/01/2011 09:08:56
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01497625
Message ID:
01497638
Views:
45
>>Pete,
>>
>>>Hi all, I need to be able to dynamically switch between UserControls on a TabPage but am unsure as to how to elegantly achieve this. So far I've tried creating another uc , adding it to the TabPage's control collection and calling the new uc's BringToFront() method. This works but how do I reinstate the original uc ? also I assume the new uc is still in the control collection of the TabPage so how do I reuse it if an when I need to ? or should I remove it ? Hope this makes sense to someone out there - maybe my thought process is screwed ?
>>
>>I am using User Controls lots and switching in ASP but not sure if that is what you have. Can you identify what your UI is built on? Also, what method are you using to add the UC's?
>>Thanks
>>Tim
>
>Hi Tim, this is all in Winforms - the uc's are loaded by the TabPages programatically.

I wondered if it was WinForms. I haven't done much winform stuff lately so not sure I would be of much help.
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform