If you want to disable Right Click in your web pages, use this java script in your web page.
<script language="JavaScript"> var message = 'Right Click is disabled';
function clickIE() { if (event.button == 2) { alert(message); return false; } }
function clickNS(e) {
if (document.layers || (document.getElementById && !document.all)) {
if (e.which == 2 || e.which == 3) { alert(message); return false; }
}
}
if (document.layers) { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS; }
else if (document.all && !document.getElementById) { document.onmousedown = clickIE; }
document.oncontextmenu = new Function('alert(message);return false') </script>
Disable Right Click on Web Page in ASP.NET
This blog will help you to disable right click on web pages.


Hitesh chotaliyaPosted Jun 25, 2018, 2:17 AM EDT
MVC Inside object not working, Pdf viewer object not working
Nithish ReddyPosted May 23, 2018, 2:38 AM EDT
Sir ! how to restrict in a pdf file ?
Blocked AccountPosted Mar 14, 2013, 2:48 AM EDT
Pankaj, If you disable the javascript, then this script will not work.
Pankaj PandeyPosted Mar 14, 2013, 2:12 AM EDT
copy and paste this java-script function in Head tags....It will work automatically.... BY http://www.varanasiworld.com/<script type="text/javascript">var message = "Function Disabled!"; function clickIE4() {if (event.button == 2) {alert(message);return false;}}function clickNS4(e) {if (document.layers || document.getElementById && !document.all) {if (e.which == 2 || e.which == 3) {alert(message);return false;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown = clickNS4;}else if (document.all && !document.getElementById) {document.onmousedown = clickIE4;}document.oncontextmenu = new Function("return false")</script>
Pankaj PandeyPosted Mar 14, 2013, 2:06 AM EDT
can you tell me where this function will call?? and if my web browser 's java script is disabled then how this java-script function will work???
Sonu SinghPosted Dec 30, 2012, 2:57 AM EST
just copy n paste... It hepls u... http://wwwsonusingh255.blogspot.in/2012/12/right-click-disable-in-aspnet-page.html