asp.net range validator on textbox
<p>I have an <code>asp:textbox</code> with both required and range validators attached to it, where the code looks like this:</p>

<p>ASP:</p>

<pre><code>&lt;asp:TextBox ID="textBox1" runat="server" CausesValidation="true"&gt;&lt;/asp:TextBox&gt;
&lt;asp:RangeValidator ID="rangeValidator1" runat="server" ControlToValidate="textBox1" MaximumValue="1" MinimumValue="0"
     ValidationGroup="valid" ForeColor="Red" ErrorMessage="Out of Range" /&gt;
&lt;asp:RequiredFieldValidator ID="requiredValidator1" runat="server" ControlToValidate="textBox1"
     ValidationGroup="valid" ForeColor="Red" ErrorMessage="Cannot be blank" /&gt;
</code></pre>

<p>And when the page is dynamically loaded (after a quick callback), I have code that is supposed to change the <code>MaximumValue</code> of the RangeValidator to more specific value. Here is the code for that:</p>

<pre><code>rangeValidator1.MaximumValue = GetMaxValue(params).ToString();
</code></pre>

<p>Now, I have set a breakpoint, and <code>rangeValidator1.MaximumValue</code> is being set correctly, however, when the page loads, and I look at the compiled client side javascript, it appears that the maximum value is still only 1.</p>

<p>What confuses me more is that any integer typed in will pass, as long as the first digit is a '1'. So if the maxValue is <em>supposed</em> to be something like "1234567", "1" will match, as will "12345678910". But "2" will not. Nor will "3000" or "46000". </p>

<p>Has anyone else had a similar issue with RangeValidators on Textboxes?</p>
