WebContainer in Session Property

I have a web application that uses separate webContainers for each “page”. I want to redirect from one page/webContainer to another, but have the ability to press a button and go back to the previous page/webContainer.

The code in the first page/webContainer:
line 1: close method that closes one page, opens the new one. Works throughout the site.
line 2: copy the webContainer (named ccMember) into a session property called Redirect to be used later to return to this page

session.loadcc(new ccNewPage)
session.Redirect = new ccMember

Once they are finished with the redirected page, I have the following code to send them back to their original page (ccMember)

session.loadcc(new Session.Redirect)

I get the following two errors:

  1. “There is no class with this name” which is associated to the second code above
  2. Parameter “NewContainer” expects class WebContainer, but this is type No Type. session.loadcc(new Session.LoginRedirect)

For reference:
Session.loadcc code:

Public Sub LoadCC(NewContainer as WebContainer)
  if not IsNull( currentCC ) then
    currentCC = Nil
  end if
  currentCC = NewContainer
  currentCC.EmbedWithin(Main, 0, 100, currentCC.Width, currentCC.Height)
End Sub

Any help would be appreciated.