我正在尝试编写一个RegularExpressionValidator,它检查以确保输入到文本框是整数(不包含“。”或“,”,只有像“500” )服务器标签格式不正确 - RegularExpressionValidator
但我也遇到过这样的:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
的代码如下:
<asp:TextBox ID="Paymenttb" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID ="PaymentValidator" runat="server" ControlToValidate="Paymenttb"
ErrorMessage="Payment must be of type Int (No "." or "," for example)." ValidationExpression="^\d+$">*</asp:RegularExpressionValidator>
这有什么问题吗? 我搜索了四周,找不到任何理由为什么这种形式不好。
你的错误信息中包含'“'这是不允许的 – Shai 2012-02-08 14:51:32