我正在尝试编写一个 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>
这有什么问题?我已经四处寻找,找不到任何原因导致这种情况没有很好地形成。