How to make an ASPX Page Become non-backable??

Discussion in 'ASP .Net' started by RC, Jun 19, 2005.

  1. RC

    RC Guest

    Hi,

    How to make a Page Become time expired when user press back button?
    Any Sample Code or reference provided?

    Thanks
    RC
     
    RC, Jun 19, 2005
    #1
    1. Advertising

  2. RC

    Joerg Jooss Guest

    RC wrote:

    > Hi,
    >
    > How to make a Page Become time expired when user press back button?
    > Any Sample Code or reference provided?


    There's no guarantee that a browser applies caching or expiration
    instructions to locally stored pages. Still, for most browsers this
    does work.

    Either set the OutputCache directive on your page(s)

    <%@ OutputCache Location="None" %>

    or set the Cache property of the HttpResponse in your code-behind class:

    Response.Cache.SetCacheability(HttpCacheability.NoCache);

    (which is equivalent to the directive shown above)

    Cheers,
    --
    http://www.joergjooss.de
    mailto:
     
    Joerg Jooss, Jun 19, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tee
    Replies:
    1
    Views:
    320
    mikeb
    Jun 7, 2004
  2. John M
    Replies:
    1
    Views:
    1,239
    Kumar Reddi
    May 29, 2005
  3. Ronald S. Cook
    Replies:
    1
    Views:
    573
    Edwin Knoppert
    Apr 12, 2006
  4. Les Caudle
    Replies:
    1
    Views:
    349
    Cowboy \(Gregory A. Beamer\)
    Sep 19, 2006
  5. BillE

    can aspx files become corrupted?

    BillE, Apr 12, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    355
    Cowboy \(Gregory A. Beamer\)
    Apr 12, 2007
Loading...

Share This Page