I am writing you on the forum because you have closed this feedback case (66245) but I think there is really a bug in WebSession.PageAt(index As Integer).Close. If you use that command it does not close the web page.
Let me explain:
I have disabled the “implicit instance” (off) because my project has quite a few web pages and I don’t want them to be loading in memory. When doing this I tried several code snippets to show the new page and close the previous one but without any success:
Snippet_1: (If you use the value 0 it does not work)
While Self.PageCount > 1 Self.PageAt(1).Close Wend
Snippet_2: (This should close all pages except the current one but does not work)
For i As Integer = 0 to Self.PageCount-1 If Self.PageAt(i) <> p then Self.PageAt(i).Close End If Next i
These code snippets don’t work and the PageCount doesn’t stop incrementing so I guess that the new pages are not closed. Also when clicking on the button to go to the third page an error occurs. Why?. Any solution?
This is the link to my example: Example_Implicit_Instance_Off
Could you help me and recheck the code, please?. I’m sure you’ll see that it’s not working correctly.
Many thanks in advance.