Hi,
I don’t understand how to “destroy” a desktop and load a page
I do a “loginpage” that open a desktop, with this code:
Application.Desktop = New Desktop1
in the desktop a button for logout and return to the login page, with this code:
Application.MainPage = New PageLogin
But the “Task Bar” remain
What is the right procedure?
thanks
Cristian
The correct procedure would be to assign null to Application.Desktop and/or to dispose the main desktop:
Application.Desktop.Dispose();
Application.Desktop = null;
Application.MainPage = new Page() { BackColor = System.Drawing.Color.Red }; // test page
However, there is a bug and the new MainPage is not immediately visible because it’s created before the active desktop is updated on the client. It will be fixed in the next build. For now the workaround is to add:
Application.Navigate(“/”);
Which is also a good idea when logging out to let the client browser clear up its memory.
Please login first to submit.