How to write the KeyPress event for textbox.

Posted by Er.deepakdalal under C# on 5/5/2010 | Views : 7241 | Status : [Member] | Replies : 2
Hi Friends

Can anyone help to write the KeyPress event for textbox i wnat to use the code in the asp.net as you know in asp.net we don't have keypress event for textbox.




Responses

Posted by: Pavanandey on: 5/6/2010 [Member] Bronze

Up
0
Down
Hi,

even thought we dont have a keypress event for text box we add the attributes to the textbox and write in javascript function and call it

Thanks
Pavan Kumar
Mark Answer if this fits the need

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 5/6/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
You mean keypress="javascript:return myfunction(event);" ?

You might use event to get what key is pressed.





www.abhisheksur.com

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response