Hello Everyone...
I have web application where user can upload only .doc file on the server...
Please provide me sample code which can put validation to check filetype ..
Thx
How to check uploaded file type using ASP.NET
Ask by John Smith
Updated 15 May 2026
You can do it by using ReguralExpressionValidator control.
Check this link for your solution: http://www.mindstick.com/Articles/7d72a758-52bc-4242-922f-6b3914895d92/?Validating%20FileUpload%20control%20for%20specific%20file%20type%20and%20required%20field.