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

  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. 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. James Hunter Ross

    Server Transfer and Back/Refresh...

    James Hunter Ross, Feb 20, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,031
    Joerg Jooss
    Feb 21, 2006
  2. Totto
    Replies:
    2
    Views:
    364
    Totto
    Sep 1, 2006
  3. morrell
    Replies:
    1
    Views:
    933
    roy axenov
    Oct 10, 2006
  4. Babba
    Replies:
    1
    Views:
    203
    Alvin Bruney
    Jul 27, 2003
  5. Jim
    Replies:
    1
    Views:
    841
    Aaron Bertrand - MVP
    Jan 28, 2004
Loading...

Share This Page