是代碼,當我選擇了錯誤的文件類型我得到即時的紅色「*」,但我沒有看到驗證摘要,有一個布頓(「上傳」),當我點擊它比我得到驗證摘要錯誤消息。的ValidationSummary不顯示 - 用的RegularExpressionValidator下面
我的問題是:爲什麼當我選擇錯誤的文件類型時不顯示驗證摘要?
<asp:ValidationSummary ForeColor="DarkRed"
ID="ValidationSummary1" runat="server" ShowMessageBox="False"
HeaderText="To save this page, the following required fields must be completed:" ShowSummary="true" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" EnableClientScript="true" runat="server" ControlToValidate="fUpload"
ValidationExpression="^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.rtf|.RTF|.Rtf|.xls|.XLS|.Xls)$" Text="*"
ErrorMessage="Invalid file type" SetFocusOnError="true" Display="Dynamic">/></asp:RegularExpressionValidator>