Click to See Complete Forum and Search --> : F5 refresh imitates button press.


GazDev
February 19th, 2003, 04:46 AM
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?

riteshtandon
February 19th, 2003, 04:57 AM
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

GazDev
February 19th, 2003, 05:08 AM
I don't press F5 during redisplay. I wait for the page to be redisplayed before pressing F5 like I said in my post.