[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

stephy

1/24/2006 7:42:00 AM


hi all,
i have a web page which is a sign in page, what i want to do is display
the page error whenever the user that has already signed in clicks on
the back button(of the internet explorer)! any ideas how to do that?

example:like when u sign in to the hotmail and then click back.

i know that we should use something like these:
Response.Cache.SetExpires(DateTime.Parse("any date")) or
Response.Cache.SetCacheability(HttpCacheability.Private)

but i donno where to put this code! please help! thxx.



--
stephy
------------------------------------------------------------------------
Posted via http://www.codeco...
------------------------------------------------------------------------

1 Answer

Joerg Jooss

1/24/2006 8:45:00 PM

0

Hello stephy,

> hi all,
> i have a web page which is a sign in page, what i want to do is
> display
> the page error whenever the user that has already signed in clicks on
> the back button(of the internet explorer)! any ideas how to do that?
> example:like when u sign in to the hotmail and then click back.

Note that there's no guarantee that not caching has any effect on browser
navigation, though it's widely implemented. Still, you should also add some
code to your login page to check whether the current user is already logged
in and display a message (although I question the functional value of such
a feature).

> i know that we should use something like these:
> Response.Cache.SetExpires(DateTime.Parse("any date")) or
> Response.Cache.SetCacheability(HttpCacheability.Private)
>
> but i donno where to put this code! please help! thxx.

That belongs in your page. Note that the cache prevention effect of this
code isn't sufficient for your case. Either add

<%@ OutputCache Location="None" %>

to your ASPX file

or

Response.Cache.SetCacheability(HttpCacheability.NoCache);

to your Code-(Behind)-File in Page_Load().

Cheers,
--
Joerg Jooss
news-reply@joergjooss.de