Disable right click on images or page in Asp.Net using jQuery

InfoPath alternatives for form designing SharePoint
In this post we will discuss how we can disable right click on images or disable right click on pages in Asp.Net using jQuery.
Also check out:
Below is the code to disable right click on images using jQuery:
<script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script>
    <script type=”text/javascript”>
     $(function () {
            $(‘img’).on(“contextmenu”, function () {
                return false;
            });
        });
</script>
Below is the code to disable right click on page using jQuery:
<script type=”text/javascript”>
     $(function () {
            $(this).on(“contextmenu”, function () {
                return false;
            });
        });
</script>
Hope this will be helpful to you.

Similar SharePoint 2013 Tutorials


About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply