Features
Keyboard events
Keyboard events let your application respond to user input. Server-side KeyDown is a lazy event: the browser sends it only when a handler is attached. To prevent a character from being entered, use a client-side handler or the Filter property, because a server-side handler runs after the browser has processed the input.
Regex Filter
Set Filter to a regular expression that identifies the characters the TextBox should accept. For example, [a-zA-Z] limits input to letters in those ranges. See Filter keyboard input.