Asp.net int属性上的PropertyProxyValidator错误

Asp.net int属性上的PropertyProxyValidator错误,asp.net,validation,application-blocks,Asp.net,Validation,Application Blocks,我使用的是应用程序块,我有一个属性使用“非空验证器”和“范围验证器” 然后在表示层中,我使用以下代码: <tr> <td width="30%"> <asp:Label ID="MyLabel" runat="server" Text="My Property"></asp:Label> </td> <td> <asp:TextBox ID="MyTextBox"

我使用的是应用程序块,我有一个属性使用“非空验证器”和“范围验证器”

然后在表示层中,我使用以下代码:

<tr>
    <td width="30%">
        <asp:Label ID="MyLabel" runat="server" Text="My Property"></asp:Label>
    </td>
    <td>
        <asp:TextBox ID="MyTextBox" runat="server" Width="175px"></asp:TextBox>
        <cc1:PropertyProxyValidator ID="MyPropertyProxyValidator" runat="server" ControlToValidate="MyTextBox" SourceTypeName="MySourceTypeName" RulesetName="MyRulesetName" PropertyName="MyPropertyName">*</cc1:PropertyProxyValidator>
    </td>
</tr>

但它不起作用

注意:字符串和日期时间属性对我来说工作正常。
对不起,我的英语:)

最后我发现了这个问题,有点尴尬,因为我忘记了填充范围验证器的上限属性,我认为如果我输入upperBoundType=“Ignore”没有必要输入上限,但是不必,你需要用任何值填充

我在Web.config验证部分有以下代码:

<validator type="XXXXX" culture="XXXXX" name="Range Validator" lowerBoundType="Inclusive" lowerBound="1" upperBoundType="Ignore" />

现在我有了这个:

<validator type="XXXXX" culture="XXXXX" name="Range Validator" lowerBoundType="Inclusive" lowerBound="1" upperBoundType="Ignore" upperBound="1" />

玉皮!!!我赢得了“风滚草”徽章:s(对不起我的英语)