1

This is my html code. I wonder why this range validator is not preventing the submit button click. any help will really be appreciated.

<asp:TextBox runat="server" class="form-control"  
     ID="AGE" ReadOnly="false" required="true"  />

<asp:RangeValidator ID="RVAGE" runat="server" MinimumValue="1" 
     MaximumValue="110" ErrorMessage="Range 1-110 "
     ControlToValidate="AGE" Display="Dynamic"> 
</asp:RangeValidator>

<asp:Button  OnClientClick="return CheckDouble();"  
     CausesValidation="true" OnClick="submitclick" 
     ID="submitbtn" runat="server" Text="Submit" >
</asp:Button>
                                  
Steve
  • 213,761
  • 22
  • 232
  • 286
  • you can refer to the link[How to disable the submit button if page validation fails in ASP.NET using javascript](https://stackoverflow.com/questions/15756891/how-to-disable-the-submit-button-if-page-validation-fails-in-asp-net-using-javas) to disable the button when the Validator shows the error message. – Jack J Jun Aug 02 '21 at 09:52

0 Answers0