In this example, you will see how to disable right click on HTML div. To prevent user by right click on HTML div, we can disable right on HTML div by using oncontextmenu event provide to disable right click.

Example
<!DOCTYPE html>
<html>
<head runat="server">
<title>Disable right click on HTML div</title>
<style>
html, body
{
font-family: Arial;
font-size: 90%;
color: #888;
line-height: 1.5em;
background-color: #FFF5FF;
}
.secret
{
border: 1pxsolid#aaa;
display: block;
width: 200px;
height: 100px;
padding: 10px;
background-color: #FFFFCF;
margin: 10px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="secret" oncontextmenu="return false;">Your ASP.NET Control</div>
<div class="secret" oncontextmenu="return false;">
<p>
<asp:HyperLink ID="HyperLink1" NavigateUrl="http://www.aspxtutorial.com"
runat="server" Target="_blank">jquery with asp.net</asp:HyperLink>
<asp:HyperLink ID="HyperLink2" NavigateUrl="http://www.aspxtutorial.com"
runat="server" Target="_blank">asp.net examples</asp:HyperLink>
</p>
</div>
</form>
</body>
</html>
Output

Download
Disable-Right-ClickonControl.aspx (888.00 bytes)
Demo
See live demo