Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering Keys Pressed
Message
 
To
07/10/2004 03:30:29
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00949438
Message ID:
00949465
Views:
8
This message has been marked as the solution to the initial question of the thread.
Are you using the Keypress event? You can use "e.Handled = True" do cancel the key.


>Good afternoon! Just would like to know how to filter keys pressed when focus is set on a TextBox control. Like I would like to prevent the user from entering characters, other than alphabets, on a textbox. Right now I am able to clean it out after the control looses the focus. In VB6 it was possible to validate the key pressed by the user and prevent it from being displayed. But the system variable e.KeyValue is read-only. Therefore, I can not set it to NULL.
>
>Any ideas on how I can achieve this?
>
>Thanx! in advance...
>
>Martin
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform