C# .NET - Right Click Validation - Asked By hiren dhameliya on 18-Sep-12 04:31 AM

HI,


there currently I am doing asp.net application ... I want to implement right click validation .....
How I can implement ........


reply me as soon as possible...


hiren

thanks 
Danasegarane Arunachalam replied to hiren dhameliya on 25-Sep-12 01:51 AM
The question is not clear. Do you want to prevent the user from right clicking ?

This needs to be done in javascript or jquery

1. http://rightclick.codeplex.com/releases/view/29358
2. http://lesson8.blogspot.in/2012/01/disable-right-click-webpage-by.html
3. Jquery code

<html>
<head>
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $(document).bind("contextmenu", function(e) {
                alert('Right click is disabled');
                e.preventDefault(); //or  return false; //
            });
        }); 
    </script>
</head>
<body>
</body>
</html>