I have a textbox, where a forbidden character cant be typed. #.
This works, however, when the textbox is filled in with data, and I put the focus on the middle of th
Just prevent the default action on keypress(keydown does not give consistent charCodes):
$('[id$=txtClient]').keypress(function (e) { if (String.fromCharCode(e.which) == '#'){ e.preventDefault(); } });
This just prevents # and leaves the rest as it is.
#
Here you go;)