Block server.transfer on Page Refresh

Discussion in 'ASP .Net' started by =?Utf-8?B?YnJpYW4=?=, Nov 24, 2003.

  1. Hello

    I have a Server.Transfer from Page A to Page B. When a user presses 'Refresh', I don't want Server.Transfer to be executed again. What is the best way to trap this? I don't want to burn a Session variable for this issue

    Thanks - Brian
     
    =?Utf-8?B?YnJpYW4=?=, Nov 24, 2003
    #1
    1. Advertisements

  2. > I have a Server.Transfer from Page A to Page B. When a user presses
    'Refresh', I don't want
    > Server.Transfer to be executed again. What is the best way to trap this? I

    don't want to burn a Session
    > variable for this issue.


    Well, the client is unaware of the transfer unless you do a
    response.redirect, so refresh will start over again. You would need to store
    something on the server so it can detect that the script has already run
    from the page you transferred to, or else use response.redirect instead.
    Without any details, it's hard to say what criteria this could be, but you
    do have to design around the fact that you can't disable functionality on
    the browser itself.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows Client
    Windows XP Associate Expert
    --
    More people read the newsgroups than read my email.
    Reply to the newsgroup for a faster response.
    (Control-G using Outlook Express)
    --
     
    Chris Jackson, Nov 25, 2003
    #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. James Hunter Ross

    Server Transfer and Back/Refresh...

    James Hunter Ross, Feb 20, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,163
    Joerg Jooss
    Feb 21, 2006
  2. Totto
    Replies:
    2
    Views:
    434
    Totto
    Sep 1, 2006
  3. morrell
    Replies:
    1
    Views:
    1,221
    roy axenov
    Oct 10, 2006
  4. evantay
    Replies:
    4
    Views:
    927
    Walter Wang [MSFT]
    May 30, 2007
  5. Babba
    Replies:
    1
    Views:
    280
    Alvin Bruney
    Jul 27, 2003
  6. Pkenty
    Replies:
    0
    Views:
    608
    Pkenty
    May 28, 2004
  7. Jim
    Replies:
    1
    Views:
    1,353
    Aaron Bertrand - MVP
    Jan 28, 2004
  8. hon123456

    How to block http file transfer

    hon123456, Oct 3, 2012, in forum: C++
    Replies:
    2
    Views:
    542
    Jorgen Grahn
    Oct 3, 2012
Loading...