我正在嘗試編寫一個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