Using ASP-TextBox within html-table(td) within FormView EditItemTemplate, within ASP-Panel, within AJAX panel, within Content-page and within Master-Page, the ValidationSummary shows the wrong ErrorMessage when validating the textbox with the SAVE-button.
The ValSummary shows "Mileage entered is less than '<%= txtMileageRangeValidator.MinimumValue %>' miles".
And NOT "Mileage entered is less than 88123 miles"
The markup for the textbox and validator follows:
<asp:TextBox ID="txtMileage" runat="server" Text='<%# Bind("Mileage") %>'
CssClass="ucIsRequired"
MaxLength="6"
AutoPostBack="True" OnTextChanged="txtMileage_TextChanged"
/>
<asp:RangeValidator ID="txtMileageRangeValidator" runat="server"
ControlToValidate="txtMileage"
Enabled="true"
Display="None"
MinimumValue='<%# Eval("aMileagePrev", "{0:D}")%>'
MaximumValue="999999"
SetFocusOnError="false"
Type="Integer"
ValidationGroup="valgrpDetails"
ErrorMessage="Mileage entered is less than '<%= txtMileageRangeValidator.MinimumValue %>' miles"
/>
However, when the error appears in the ValidationSummary, it appears exactly as listed above -- it does not substitute the MinimumValue into the error-text.
What am I doing wrong? Thanks.