On Tue, 3 May 2005 11:50:32 -0400 in
microsoft.public.dotnet.framework.aspnet, "Andre"
<we*******@cablevision.qc.ca> wrote:
Hi,
I have an application that display users invoice.
On every page i have an "Exit button". Is there a way, if the user click
on "Exit" (to logoff from the system), and after on Back in is browser to
prevent the page to display the informations. So if the user click Exit, no
one can come after him and check is informations.
If you're using .NET 2.0, you could use the <asp:LoginView> control to
wrap the controls on your aspx page that display sensitive
information.
Another way is to store a value in Session that indicates whether the
user is logged in or not. Then in your Page_Load (or a data binding
method) add some code such as:
bool b = (bool) Session["IsLoggedIn"];
if (b == true)
{
// User is logged in, populate the form controls
}
else
{
// User is not logged in, display an error message
}
When the user clicks 'Exit', set the value in Session to false.
Hope that gets you started,
Roger