Jump to content

Event.KeyCode


d@rk_blu3

Recommended Posts

I nid help.....I have a txtbox that can only accept numbers and the decimal point.The question is what is the keycod in the keybd and in the keynumpad of ".". Pls help..... :)

Link to comment
Share on other sites

if(Event.KeyCode == Keys.Decimal || Event.KeyCode == Keys.OemPeriod){}
Is this only for Windows Forms? Or does this work on Web Forms as well?
Link to comment
Share on other sites

Just WinForms. Keypresses are client side so JavaScript is the only option for web.
hah. I knew that, I must have not been thinking. Thanks!
Link to comment
Share on other sites

hah. I knew that, I must have not been thinking. Thanks!
That was what I was thinking when I responded. I was thinking I hope he isn't offended by my response because I know he knows that :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...