how to disable f5 and right click and reload buttoninbrowser
how to disable f5 and right click and reload button in browser in asp.net?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Dec 6, 2013, 7:08 AM
You can do something like,
F5:
document.onkeydown = function()
{
switch (event.keyCode)
{
case 116 : //F5 button
event.returnValue = false;
event.keyCode = 0;
return false;
case 82 : //R button
if (event.ctrlKey)
{
event.returnValue = false;
event.keyCode = 0;
return false;
}
}
}
RightClick:
document.onmousedown=function(){
if(event.button==2)
return false;
}
Refresh Button:
You have to remove the Toolbar :)