How to add filter to the fileupload control in asp.net? I want a filter for Oasis File (.000).?
Please advice me... thank you very much!
You can use RegularExpressionValidator
<asp:RegularExpressionValidator ID="rexp" runat="server" ControlToValidate="fupProduct"
ErrorMessage="Only .gif, .jpg, .png, .tiff and .jpeg"
ValidationExpression="(.*\.([Gg][Ii][Ff])|.*\.([Jj][Pp][Gg])|.*\.([Bb][Mm][Pp])|.*\.([pP][nN][gG])|.*\.([tT][iI][iI][fF])$)"></asp:RegularExpressionValidator>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With