CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Manchester, England
    Posts
    11

    F5 refresh imitates button press.

    I have a couple of buttons on my page which have code behind handlers. This works great - I press either of the buttons on the client page and the button click event handler function runs. Then the page is sent back to the client.

    However, I have noticed that when I press F5 to refresh the page the previously triggered event handler is triggered again. In other words if I press button 1 and wait for the page to be redisplayed and then press F5, the same button handler is triggered even though I haven't pressed it this time.

    Is it possible to make an F5 refresh appear to the server as though the page has been hit for the first time?

  2. #2
    Join Date
    Feb 2003
    Location
    Hyderabad
    Posts
    181
    since u are reffreshing the page during redisplay so the same code gets executed when u press F5.

    Try to use a check in your code (i.e. a Flag set to true when button pressed ) to check that whether user has clicked the button or not and set the flag to false when the page displays completely.


    Ritesh

  3. #3
    Join Date
    Jan 2003
    Location
    Manchester, England
    Posts
    11
    I don't press F5 during redisplay. I wait for the page to be redisplayed before pressing F5 like I said in my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured