When user try to upload pdf file, file name as "Terms & Policy.pdf" as per RegularExpressionValidator it is not accepting.
<asp:FileUpload ID="gv_fudoc" runat="server" class="upload up" accept=".pdf" />
<asp:RegularExpressionValidator ID="regpdf" Display="Dynamic" ForeColor="#ff3636" SetFocusOnError="true" Font-Size="11px" Style="letter-spacing: 1px" ErrorMessage="Please upload only PDF file" ControlToValidate="gv_fudoc" ValidationGroup="gv_rfdoc" ValidationExpression="^.*\.(pdf|PDF)$" runat="server"> <i class="fa fa-exclamation-triangle"></i> Please upload only pdf file. </asp:RegularExpressionValidator>
Try to upload pdf file name as "Terms & Policy.pdf" using following code. It will not accept.