write a ValidationExpression of asp:RegularExpressionValidator for uploading the images
I wanted to upload images (Jpgs and Gifs) only so what is the ValidationExpression of asp:RegularExpressionValidator for uploading the images.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Puran KaushalPosted Jun 10, 2009, 7:24 AM
in a RegularExpressionValidator. The only problem was with the string
case. I didn't find a way to specify that the regular expression is case
insensitive for the RegularExpressionValidator. The expression can be
rewritten to
^.+\.(([jJ][pP][eE]?[gG])|([gG][iI][fF]))$
to allow extensions like jPeG etc