I used the code in the method below to lock my keyboard and it worked for me.
<asp:textbox id="t1" onkeypress="return false;" />
Now I want to add some more for this, and I'm tired of doing the same with extra code like
<script type="text/javascript"> fuction disablekeys() { return false; } </script> <asp:textbox id="t1" onkeypress="disablekeys();" />
But this code does not work. Why?
source share