How to expire a page (VB) ASP.NET

  • Thread starter AuntieAuntieAuntie
  • Start date
A

AuntieAuntieAuntie

There are two pages, A and B.
Page A is the Login page and Page B is the results presented fromthe stored
procedure as well as a table which contains buttons that the user uses to
clock in an out during the day. With option "C" and "D" listed below the
database results are expired but the table which contains the button for
clocking in an out remains visible. No Cache option works in classic ASP but
the same results I have not been able to reproduce in ASP.NET.


The user can navigate, using the submit button, from A to B and are free to
return to A using the back button but they MUST not be able to naviagate from
A to B using the forward button. How to disable or otherwise minimize this
from occuring?
I have tired to use the following to expire the page, but nothing is working
thus far; which is interesting as in classic ASP expiring a page is a
cake-walk, but not in ASP.NET. Oh goodness, please help.

Thank you.

I have tried:
A. 'Cache set to No Cache
Response.Buffer = True
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1))
Response.Expires = -1 '.Subtract(New TimeSpan(1, 0, 0, 0)).ToString()
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
Response.AppendHeader("Cache-Control", "no-cache")
Response.CacheControl = "no-cache"

B.
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Cache.SetExpires(DateTime.Now)

C.
Session.Abandon()

D.
Session.Clear()
 
A

AuntieAuntieAuntie

The database results are expired and not visible but the table which contains
the buttons for clocking in an out remains visible.

What else can I try?
 
A

AuntieAuntieAuntie

Solution Found.
As a work around, instead of not allowing the user to go forward, they are
not prevented from going back.

Thanks.

Auntie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top