hello,
I have this JavaScript once user selects the file i want to show the file name user has selected
lblError.innerHTML = "";
var allowedFiles = [".doc", ".docx", ".pdf"];
var fileUpload = document.getElementById("<%=fudigitalfile.ClientID %>");
var lblError = document.getElementById("lblError");
var regex = new RegExp("([a-zA-Z0-9\s_\\.\-:])+(" + allowedFiles.join('|') + ")$");
if (!regex.test(fileUpload.value.toLowerCase())) {
lblError.innerHTML = "Please upload files having extensions: <b>" + allowedFiles.join(', ') + "</b> only.";
return false;
}
else {
lblError.innerHTML = fileUpload.file;
}