Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / January 2006

Tip: Looking for answers? Try searching our database.

asp.net caching question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stephy - 24 Jan 2006 07:42 GMT
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.


Joerg Jooss - 24 Jan 2006 20:44 GMT
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,
Signature

Joerg Jooss
news-reply@joergjooss.de


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.