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. Advertisements

  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. Advertisements

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. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,269
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,609
    Matt Morris
    Jan 23, 2004
  3. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    730
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  4. Progman
    Replies:
    2
    Views:
    2,150
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 13, 2006
  5. uto
    Replies:
    3
    Views:
    830
    Michael Hamrah
    Mar 8, 2006
  6. MadHatter51
    Replies:
    1
    Views:
    1,137
    Hakan Lambracht
    May 17, 2006
  7. S_K
    Replies:
    1
    Views:
    532
    IfThenElse
    Oct 2, 2007
  8. S_K
    Replies:
    0
    Views:
    490
Loading...