The only way I know of is to use an HTML TextField instead of a Web Forms TextBox and use JavaScript.
The HTML element would look like:
and the JavaScript:PHP Code:<INPUT onkeypress="return KeyCheck(this, event);" id="txtTest" type="text">
PHP Code:function KeyCheck(myField, e)
{
var key;
if (window.event)
key = window.event.keyCode;
else if(e)
key = e.which;
else
return true;
if (((key > 47) && (key < 58)) || (key == 8))
return true;
else
return false;
}




Reply With Quote