Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get the ASCII value of the key which is pressed in our keyboard using javascript or Winforms for a Windows application or in a Web application.

If I can do for both, please suggest me some good sites where i can study this :)

Thanks in Advance :)
Posted

1 solution

try using javascript,

C#
function GetCodeAcc(e)
     {
     alert(e.keyCode);
     }


<asp:textbox id="TextBox1" runat="server" onkeypress="GetCodeAcc(event);" xmlns:asp="#unknown" />
 
Share this answer
 
Comments
Velrats 22-Mar-13 1:14am    
Thankls a lot... its working fine :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900