views:

17

answers:

1

I using coolite in my project. And upload files through the FileUploadField control. I have to add a filter for the file type, so that the user could see only jpeg and bmp files from the choose file dialog. Havent found how this can be implemented in the web. Can anyone give me a hint on this one?

A: 

Unfortunately, this isn't possible through the standard browse-for-file box that appears, however you can instead use a RegularExpressionValidator to validate the filename (regex below untested):

ValidationExpression="^(.*)\.(([jJ][pP][eE]?[gG])|([bB][mM][pP]))$"
Keith