Friday, May 18, 2012
        Register
   
Product Blog
15

 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.

multipleview.gif

Post Rating

Comments

Owen Lee
# Owen Lee
Thursday, December 15, 2011 3:32 AM
Your article was a good read, and I like the way you write. By the way, let me recommend you an ainol novo7 as an awesome X-mas gift. Hope you'll like it.

Post Comment

Only registered users may post comments.

Product Links

Privacy Statement  |  Terms Of Use Copyright 2000-2009 InDyne Commercial Products Corporation