Title |
Test
Find
To validate the File Type for a FileUploader
|
Expression |
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$ |
Description |
You can use this to check the valid file type you have given to the last in the expression
like
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+(.pdf)$
This will accept .pdf only
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc))$
This will accept .pdf and .doc
OR
^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))+((.pdf)|(.doc)|(.txt))$
This will accept .pdf , .doc and .txt |
Matches |
C:\Documents and Settings\chandan.kumar\Desktop\1004.pdf |
Non-Matches |
C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg |
Author |
Rating:
Chandan Kumar
|
Source |
CAHNDAN KUMAR |
Your Rating |
|
Title: feed back
Name: samatha
Date: 9/8/2008 7:08:32 AM
Comment:
this is good,but it will work only in IE,but not supporting for opera,firefox browsers,pls check it once...thank you