当前位置:编程学习 > C#/ASP.NET >>

一個驗證控件幾正則表達式 請高手幫忙看看

 <asp:FileUpload ID="FileUpload1" runat="server" />

     <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="格式不對" ValidationGroup="1" 
ValidationExpression="^[a-zA-Z]:(\\.+)(.doc|.docx|.JPEG|.jpeg|.JPG|.jpg|.GIF|.gif|.BMP|.bmp|.PNG|.png)$" ControlToValidate="FileUpload1">
       </asp:RegularExpressionValidator>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  
                                    ErrorMessage="*" ControlToValidate="FileUpload1" ValidationGroup="1"></asp:RequiredFieldValidator>
                                  <asp:Button ID="Button3" runat="server" Text="上  傳" Width="88px" 
                                    onclick="Button3_Click"  ValidationGroup="1" />

此正則表達式有錯誤嗎? 往高手指教````` --------------------编程问答-------------------- 帮顶下。 --------------------编程问答-------------------- 自己頂下
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,