this blog contains information for .net and sql stuffs. You can find various tips and tricks to overcome problem you may be facing in ...

Tuesday, June 23, 2009

Disable Right click Context menu on Web Page

There are some situation when we want to hide our source code from user. User can easily see your web page source code by right click on page.


There are so many scripts available to disable right click. you can even open context menu by keyboard.


This is some what easy and hands on attribute to disable right click

Just write..

oncontextmenu=”return false;” in body tag...


This will not allow user to open context menu by key board or by mouse. Just try it..

No comments: