Posted on: 9/14/2013 1:05:08 PM | Views : 603

Hello,
I have a one web page in that i want to disable F5 or refresh key. I have  generated asp controls dynamically in that page.I have generate two rows.
1) First Row contains one text textbox and buttons
2) second row contains label.
When i click on button of first row then i do first row visible false and secod row visible true and that time again i press F5 the page  is refresh.in this case i want to disable F5 Key.
I have use below javascript :
document.onkeydown = checkKeycode function checkKeycode(e) { debugger; var keycode; if (window.event) keycode = window.event.keyCode; else if (e) keycode = e.which; // Mozilla firefox if ($.browser.mozilla) { if (keycode == 116 || (e.ctrlKey && keycode == 82)) { if (e.preventDefault) { ...

Go to the complete details ...