How to validate or protect to perform right click via mouse as well as keyboard on the textbox in asp.net c#


In this article, many we need to protect to perform the right click of mouse and keyboard for the security purpose. In this code we have use only the property on html   We can get this thing with below code:-

In asp.net:-


<asp:TextBox ID="txtmsg" runat="server" oncontextmenu="return false"></asp:TextBox>

In HTML:- 

<input type="text" ID="txtmsg" oncontextmenu="return false"/>



Note :- use this code we did not any alert method , if you want that I will show any error method then you can prefer How to validate or protect to perform right click via mouse as well as keyboard on the textbox using Java Script in asp.net c#
How to validate or protect to perform right click via mouse as well as keyboard on the textbox in asp.net c# How to validate or protect to perform right click via mouse as well as keyboard on the textbox  in asp.net c# Reviewed by NEERAJ SRIVASTAVA on 1:00:00 PM Rating: 5

No comments:

Powered by Blogger.