Saturday, March 24, 2012

Why Refresh Calls Click Event Of Submitting Button

Dear Friends,
I'm facing a problem that after clicking on a button (HTML Server Or Web Server Button) if I click Refresh Button Why the button_onclick() event calls automatically how can I check or prevent this Pls Help Me??Can yo explain yourself better cos I dont know exactly what your problem is?
Probably because after you're clicking on it, the page gets submitted back to itself, and pressing refresh posts the same data back to the server.
Can yo explain yourself better cos I dont know exactly what your problem is?

Look Buddy What my problem is when ever I write some code on any web form's button_click() event that should run only after clicking the button but whenever if I click REFRESH button of internet explorer (after clicking the web form's button) the code of that button runs again and I need a way to stop this and wanna know the reason behind this pls help me and I hope you understand the problem I'm facing
Bye
Look Buddy What my problem is when ever I write some code on any web form's button_click() event that should run only after clicking the button but whenever if I click REFRESH button of internet explorer (after clicking the web form's button) the code of that button runs again and I need a way to stop this and wanna know the reason behind this pls help me and I hope you understand the problem I'm facing
Bye
I want a way to stop this pls help
me
I have the same problem, clicking 'refresh' clicks the button. There's a quick workaround: If your page is //localhost/mypage.aspx, just real quick enter a nonsense page like pop in a letter at the end of the url: //localhost/mypage.aspxq. This will
cause an error, then go back and remove the q and click enter and your page will load as if its new.

Not the best solution, but it works.
Or just press Ctrl+F5.

Or show us your code.

0 comments:

Post a Comment