Closing WebPage and WebContainer: a basic question

Can I assume that when I move the user from, say, WebPage1 to WebPage2 (via WebPage2.Show), both these occur:

  1. WebPage1 closes.
  2. All controls (including WebContainers) in WebPage1 close.

I just want make sure that I’m minimizing how much goes through the pipe between Web and user.

WebPage1 and it’s controls do not Close. You need to close WebPage1 explicitly.

Thanks, David. I was worried that might be the case. That said, would I be minimizing traffic between Web server and Web client by getting rid of Implicit Instance on each of these WebPages? It seems that if I want a generic CloseOtherWebPages method to cover this, where it closes all other WebPages but the current one, each would have to be open before closing it.

That is, WebPage1.Close will implicitly open and close WebPage1, even if it wasn’t open at that time. I don’t mind that so much if it doesn’t increase traffic between Web server and Web client. But if it does, it sounds like such methods should rely on Implicit Instance being OFF.

What I’m doing now, based on another discussion in this forum ( is to use this global method called CloseOtherPages:

// Closes all WebPages except nameOfPageToNotClose Dim i As Integer For i = Session.PageCount - 1 DownTo 0 If Session.PageAtIndex(i) <> Session.PageWithName(nameOfPageToNotClose,True) Then Session.PageAtIndex(i).Close End If Next

In the Shown event of a WebPage where I don’t want others to remain open, I just do