I am implementing the user logout function. However, I can not find the best way to clear all session froms application.
We have Session.Clear(), Session.RemoveAll() and Session.Abandon() to remove all sessions from Asp.Net web.
In the Wisej, How can I do that?
Session.Clear or Abandon or RemoveAll don’t clear all sessions. It only clears all values stored in the single current session.
In Wisej if you want to terminate a session or an application use Application.Exit(). If you stored something in the session object use Application.Session.Clear(). The Application.Session object is a dynamic object in Wisej but it also implements the IDictionary interface.
To close all open windows iterate the Application.OpenForms collection. However when you call Form.Close if your code handles FormClosing and cancels the form will not close. You can force it calling Close(CloseReason.ApplicationExit) but it’s an internal method, you’d have to call it using reflection. We can make it public if needed.
Application.exit() does the job, but how can I do to to again to the login page after it?
Thanks in advanced,
Please login first to submit.