I am facing a dilemma with my GridView that contains a textbox in one of its fields. To ensure that the user enters only a single character "x", I have implemented a range validator:
<asp:TextBox ID="txtMP3Master" runat="server" Text='<%# Eval("MP3Master") %>' BorderStyle="None" Width="80%" MaxLength="1" onchange="JSSaveNTSChanges(this);"></asp:TextBox>
<asp:RangeValidator ID="MP3MasterRangeValidator" runat="server" ControlToValidate="txtMP3Master" Display="Dynamic" ErrorMessage="MP3 Master can be nothing but 'x'" Text="*" MinimumValue="x" MaximumValue="x" ValidationGroup="InsertUpdateNewTitlesStatusValidation">
</asp:RangeValidator>
Although the validator displays "*" on incorrect input, the JSSaveNTSChanges() function is still triggered. Ideally, I want this function call to be blocked when the input is invalid. Interestingly, the CompareValidator functions correctly in other fields by preventing corresponding functions from executing upon invalid input. Is there a way to resolve this issue? Thank you.