I am trying to capture the keypress event of an asp.net textbox.
In the Default.ASPX.VB page, I haveFor Page_Load....: TextBox1.Attributes.Add("OnKeyPress", "GetKeyPress()")
In the Default.ASPX Code page, I have
<Script>
Function GetKeyPress(){ alert("you Pressed " & event.KeyCode;}
</Script>
It catches teh event, but the message box always says "You Pressed 0", no matter what key i press. Also, I would really like to know how to do this in VB instead of JavaScript, if it is possible.
Thanks
...
Go to the complete details ...