I am using a regular expression to validate a file chosen for upload. Below is the code and it works great:
<asp:RegularExpressionValidator ID="regexValidator" runat="server"
ControlToValidate="CustomerFileUpload"
ErrorMessage="Only Excel files are allowed"
ValidationExpression="(.*\.([Dd][Oo][Cc])|.*\.([Dd][Oo][Cc][Xx])$)">
Now, I need to figure out how to validate the filename portion of the filename (Minus the filename extension).
The filename is supposse to be in this format: customernumber_yyyymmddhhmmss
How can I validate the filename so that it is in that format? Can someone help me out?
I don't care if it is validated on the server side or client side. As a last resort I could use Java Script, but would prefer not to.
...
Go to the complete details ...