<asp:rangevalidator>不触发

时间:2019-03-01 05:40:04

标签: c# asp.net

我的文本框的范围验证器根本不起作用。

有什么想法吗?

        <asp:Panel runat="server" ID="panOdometerReading">
            <tr>
                <td class="label right">
                    <fastr:ControlLabel runat="server" ID="lblWarrantyOtherInformationOdometer"> 
                        <asp:RequiredFieldValidator runat="server" ID="valWarrantyOtherInformationOdometer" Display="Dynamic" ValidationGroup="vgOdometerTxt" ControlToValidate="txtOdometer" ErrorMessage="Please enter the vehicle's odometer reading.">*</asp:RequiredFieldValidator>
                        <asp:RangeValidator runat="server" ID="valWarrantyOtherInformationOdometerRange" Enabled="True" Display="Dynamic" ValidationGroup="vgOdometerTxt" ControlToValidate="txtOdometer" MinimumValue="0" MaximumValue="999999" Type="Integer" ErrorMessage="Invalid odometer reading.">*</asp:RangeValidator>
                        <asp:CustomValidator runat="server" ID="valWarrantyOtherInformationOdometerCustomeValidator" ValidationGroup="vgOdometerTxt" OnServerValidate="cvWarrantyOtherInformationOdometer_OnServerValidate" ControlToValidate="txtOdometer" Display="Dynamic" ErrorMessage="Invalid odometer reading.">*</asp:CustomValidator>
                        Odometer Reading
                    </fastr:ControlLabel>
                </td>
                <td class="formInput">
                    <asp:TextBox runat="server" ID="txtOdometer" Text='<%# Proposal.Vehicle != null ? Proposal.Vehicle.Odometer.ToString() : String.Empty %>' ValidationGroup="vgOdometerTxt" OnTextChanged="txtOdometer_OnTextChanged"/>
                </td>
            </tr>
        </asp:Panel>

欢呼

0 个答案:

没有答案