文件上传与RegularExpressionValidator不适用于Firefox只有IE浏览器 [英] File Upload with RegularExpressionValidator not working with Firefox only IE

查看:157
本文介绍了文件上传与RegularExpressionValidator不适用于Firefox只有IE浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有RegularExpressionValidator的FileUpload,带有下面的验证表达式:

$ $ $ $ $ $ $ $ $ $ $(([a-zA-Z] :?。)|(\\ {2} \w +)\ $)(\\(\w [\w] *))+(GIF | .JPG | .JPG |。 JPEG | .GIF | .JPEG |巴纽| .BMP |使用.3dm | .3dmf | .AI | .drw | .DXF | .esp | .mng |巴纽| .PS | .psp | .SVG | .TIFF)

这样我确保用户只上传图片。
但由于某种原因,当我使用Firefox时,它不起作用。为什么是这样的,我该如何解决这个问题?我发现了解决方案.....

解决方案



$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $($) [pP] [eE] [gG] | [bB] [mM] [pP])$)

链接到答案



<享受!!!


I have a FileUpload with a RegularExpressionValidator with the following Validation Expression:

^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.gif|.jpg|.JPG|.JPEG|.GIF|.jpeg|.png|.bmp|.3dm|.3dmf|.ai|.drw|.dxf|.esp|.mng|.png|.ps|.psp|.svg|.tiff)$

This way I make sure the User only upload images. But for some reason it does not work when I use Firefox. Why is that and how can I go around the problem?

解决方案

I found the solution.....

(.*\.([gG][iI][fF]|[jJ][pP][gG]|[jJ][pP][eE][gG]|[bB][mM][pP])$)

Link to the answer

Enjoy!!!

这篇关于文件上传与RegularExpressionValidator不适用于Firefox只有IE浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆