I have a div tag that contains a textbox and a submit button. I am trying to only have the submit button work if the text entered is a number (int or decimal). However when running the debugger, the onclick function is called no matter what text is entered. Any idea how I messed this up?
<div class="content">
<table class="inputForm">
<tr>
<th>Percentage:</th>
<td>
<asp:TextBox ID="VATAmount" runat="server"></asp:TextBox>
</td>
<td>
<asp:LinkButton ID="VATSubmit" runat="server" SkinID="Button" OnClick="VAT_Click" Text="Submit"></asp:LinkButton>
</td>
</tr>
</table>
<i>50% should be entered as 50</i>
<cb:RequiredRegularExpressionValidator ID="VATVerify" runat="server" ControlToValidate="VATAmount"
Display="Static" ErrorMessage="The Percent should be written as a decimal." Text="*" ValidationGroup="Add"
ValidationExpression="[*0-9]*\.[*0-9]" Required="true">
</cb:RequiredRegularExpressionValidator>
Also I should note that the * does appear when an incorrect value is entered, but not when a correct one is entered