I'm very very tired, I might be overlooking something.

On a page named default.aspx, I have placed a control called LeftMenu.ascx.

Now, leftmenu.ascx itself is empty, but in its codebehind, depending upon the a certain Session variable's value, I am trying to load LeftMenuSuper.ascx or LeftMenuHeader.ascx. So, that's a control within a control.

Here is the code in LeftMenu.ascx.vb:

VB Code:
  1. If Session.Item(0).ToString = "normaluser" Then
  2.             Me.LoadControl("LeftMenuNormal.ascx")
  3.         Else
  4.             Me.LoadControl("LeftMenuSuper.ascx")
  5.         End If

The problem is, nothing happens. The area where the menu is supposed to be just stays blank, and yes, both of these "child" ascx files contain HTML.

(This is all experimental, so we won't talk about good or bad practices here.)

Help me out, what am I doing or not doing?