Fuji Nguyen posted on November 15, 2005 10:45

Code walk thru:
SwitchBoard.ascx - This is the View page, in which line 2 is a placeholder
SwitchBoard.ascx.vb - This is the code behind of SwitchBoard.ascx. Line 86 is used for loading different user control by calling the Control_Load() routine. The Control_Load code is in line 21 to 44. In this example, one of the 2 user controls could be loaded. Line 14 has the default control to be loaded. Notice that the Control_Load routine is placed in the Page_Init, not in Page_Load event.
Utility.vb - This is used to dynamically build the URL of the module.
Sample project is available for download at the bottom of this page. Demo is on the left pane. In this demo, the main View page (SwitchBoard.ascx) loads one of the three controls in the sub-folder Folder1, Folder2 and Folder 3.
Picture below has a screen shot of where files resided in the the project.
