1

这是我的列表视图

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="Year" 
        DataSourceID="AccountValueFundsDataSource" InsertItemPosition="LastItem">
........
</asp:ListView>

这是我的数据源

<asp:SqlDataSource ID="AccountValueFundsDataSource" runat="server" 
        ConflictDetection="CompareAllValues" 
        ConnectionString="<%$ ConnectionStrings:Life_InsuranceConnectionString %>" 
        DeleteCommand="DELETE FROM [AccountValueFunds] WHERE [Year] = @original_Year AND [avfcharge] = @original_avfcharge" 
        InsertCommand="INSERT INTO [AccountValueFunds] ([Year], [avfcharge]) VALUES (@Year, @avfcharge)" 
        OldValuesParameterFormatString="original_{0}" 
        SelectCommand="SELECT * FROM [AccountValueFunds]" 
        UpdateCommand="UPDATE [AccountValueFunds] SET [avfcharge] = @avfcharge WHERE [Year] = @original_Year AND [avfcharge] = @original_avfcharge">
        <DeleteParameters>
            <asp:Parameter Name="original_Year" Type="Int32" />
            <asp:Parameter Name="original_avfcharge" Type="Decimal" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Year" Type="Int32" />
            <asp:Parameter Name="avfcharge" Type="Decimal" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="avfcharge" Type="Decimal" />
            <asp:Parameter Name="original_Year" Type="Int32" />
            <asp:Parameter Name="original_avfcharge" Type="Decimal" />
        </UpdateParameters>
    </asp:SqlDataSource>

我的问题是如何验证输入?例如,如果用户输入参数类型为十进制或整数的字符串?

4