Avoid Calling click event on pressing F5
Dear Buddy,:)
I have V2 2005 Framework 2.0, On a web page I have TextBox, few Buttons on it, on click of a button some action happened, later on pressing F5 from keyboard , same button click event gets called, to avoid that I had changed to EnableViewState= false but my purpose didn’t served, button click event still get called.
I want to know, how to stop calling button click event on pressing of F5 button.
please help..
Thanks & Regards,
PPCC:mad:
Re: Avoid Calling click event on pressing F5
Hey,
One way to prevent this would be to redirect to another page once the work has been done in the Button Click event.
Another method would be to add a variable to the ViewState of the button to show that you have already clicked it, and inspect that ViewState in the click event.
Hope that helps!!
Gary
Re: Avoid Calling click event on pressing F5
Re: Avoid Calling click event on pressing F5
Quote:
Originally Posted by
dnanetwork
Hey,
How exactly does that help?
That example is for a Windows Form Application?!?
Gary