dinesh_bali
asked on
Excel file checking using RegularExpressionValidator
Hi
I am working on ASP.net2.0, C#
I have a regular expression which checks if file is xls or not
It works fine, if we sellect the file from local system or map drive
But it does not work if we take the file from map drive
like
\\barney\Testing\Excel Example_R1.xls
My RegularExpressionValidator is
<asp:RegularExpressionVali dator id="RegExpFile" runat="server" ErrorMessage=" "
ControlToValidate="FileUpl oad1" ValidationExpression="^.+\ .((xls)|(X LS)|(Xls)) $"></asp:R egularExpr essionVali dator>
Please help
This is very urgent for me
I am working on ASP.net2.0, C#
I have a regular expression which checks if file is xls or not
It works fine, if we sellect the file from local system or map drive
But it does not work if we take the file from map drive
like
\\barney\Testing\Excel Example_R1.xls
My RegularExpressionValidator
<asp:RegularExpressionVali
ControlToValidate="FileUpl
Please help
This is very urgent for me
ASKER
Sorry, It was [a-zA-Z0_9].*\bxls\b
Is the ="^.+\.((xls)|(XLS)|(Xls)) $
As I only want user should select only excel file, he should not able to select any other file
Thanks
Is the ="^.+\.((xls)|(XLS)|(Xls))
As I only want user should select only excel file, he should not able to select any other file
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
\\barney\Testing\Excel Example_R1.xls
Does it make any difference if you omit the "^.+"