This is a migrated thread and some comments may be shown as answers.

Restricting document type

1 Answer 52 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 16 Feb 2011, 09:25 AM

Hi

How can I restrict the user to select only a docx file for upload and to catch it if it’s not?

Thanks

Regards

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Feb 2011, 10:29 AM
Hello John,

You can set the AllowedFileExtensions property to the desired file types.Then use CustomValidator, either from client side or server side, for checking the file extensions.

Here is the documentation which explains the same.
Validating using an ASP.NET validator

Thanks,
Shinu.
Tags
Upload (Obsolete)
Asked by
John
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or