【发布时间】:2012-02-08 14:49:49
【问题描述】:
我正在尝试编写一个 RegularExpressionValidator 来检查以确保输入到文本框中的条目是整数(不包含“。”或“,”,只有整数值,如“500”)
但是我遇到过这种情况:
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>
这有什么问题? 我已经四处寻找,找不到任何原因导致它没有很好地形成。
【问题讨论】:
-
您的错误信息包含不允许的
"
标签: c# asp.net regex server-tags