Here Mudassar Ahmed Khan has explained with an example, how to restrict user from entering Special Characters in TextBox using jQuery.
This article will illustrate how to perform AlphaNumeric validation for TextBox i.e. allow only Alphabets and Numbers in TextBox using jQuery.
When User types in the TextBox, the text in the TextBox will be validated using OnKeyPress event handler in jQuery and if the inputted character is not AlphaNumeric i.e. Alphabet or Number, the error message will be displayed next to the TextBox.