How about you use a
<code>
FilteredTextBoxEditor instead of a
CompareValidator
. It is more appropriate for your situation. You don't have to do extra coding or any validation. Please check
here[
^].
Example usage for only allowing numbers:
<ajaxToolkit:FilteredTextBoxExtender ID="ftbe" runat="server"
TargetControlID="TextBox3"
FilterType="Numbers"
ValidChars="0123456789" />
Good luck,
OI