Here I will explain how to check or validate file type in file upload control using JavaScript and regular expression to check file extension before file upload using JavaScript in asp.net.
Description:
I have one page that contains one file upload control to accept files from user and saving it in one folder. Here I need to give permission for user to upload only .doc or .docx files for that I have written validation by using JavaScript to validate files before save it in database.
Here I have some of regular expressions to validate file upload.