Sometimes we required to prevent our web page images from being copied by another Persion.in that case we can secure our images by disabling right click or by disabling image context menu on images only. This is an effective approach to prevent our images from being copied .Add the below event handler to the img tag and body as shown below:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Fourm.aspx.cs" Inherits="Forumasp.Fourm" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> function disableRightClick() { alert("Sorry, right click is not allowed !!"); return false; } </script> <meta charset="utf-8"> <title>jQuery UI Menu - Categories</title> </head> <body oncontextmenu="return disableRightClick()" > <img alt="Image" src="Images/1.jpeg" oncontextmenu="return disableRightClick()"/>
</body>
</html>
c
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Sometimes we required to prevent our web page images from being copied by another Persion.in that case we can secure our images by disabling right click or
by disabling image context menu on images only. This is an effective approach to prevent our images from being copied .Add the below event handler to the img tag and body as shown below:
c