Hi all, mostly i do VBA programming so this is somewhat new to me, ive set up a page with a fileupload control on it, however, my regularexpressionvalidator doesnt work correctly, after uploading the first zip file, the regularexpression error message doesnt clear itself, by using a response.write(File1.hasfile) in the onload event of this page it appears as though the FileUpload control doesnt empty itself correctly after upload completion, how would i go about doing this? And what exactly part of the fileupload function does regularexpressionvalidator check? I assumed it was FileName, but thats not the case as that part does clear.
Cheers.
############## CODE START ##################
<table border="0" width="600" align=center>
<tr>
<td>
<asp:FileUpload EnableViewState=false id=File1 runat="server" />
</td>
</tr>
<tr><td>
<asp:Button id="Submit1" runat="server" OnClick="Button1_Click" Text="Upload File" />
</td>
</tr>
</table>
<br />
<div align=left>
<asp:RequiredFieldValidator Display=Dynamic id="RegularExpressionValidator2" runat="server" text="<b>Note: You must provide a file path!</b>" ControlToValidate="File1" />
<asp:RegularExpressionValidator Display=dynamic id="RegularExpressionValidator1" runat="server" text="<b>Note: Only .zip files are allowed!</b>" ValidationExpression="(^([\w*\s*\d*\(*\)*\\*_*\-*]*)$|^((([a-zA-Z]|
(\\{2}\w+)\$?)(\\(\w([\w*\s*\d*\(*\)*\\*_*\-*]*)))+(.zip|.ZIP))$)" ControlToValidate="File1"></asp:RegularExpressionValidator>
####################### CODE END ######################
Cheers.
############## CODE START ##################
<table border="0" width="600" align=center>
<tr>
<td>
<asp:FileUpload EnableViewState=false id=File1 runat="server" />
</td>
</tr>
<tr><td>
<asp:Button id="Submit1" runat="server" OnClick="Button1_Click" Text="Upload File" />
</td>
</tr>
</table>
<br />
<div align=left>
<asp:RequiredFieldValidator Display=Dynamic id="RegularExpressionValidator2" runat="server" text="<b>Note: You must provide a file path!</b>" ControlToValidate="File1" />
<asp:RegularExpressionValidator Display=dynamic id="RegularExpressionValidator1" runat="server" text="<b>Note: Only .zip files are allowed!</b>" ValidationExpression="(^([\w*\s*\d*\(*\)*\\*_*\-*]*)$|^((([a-zA-Z]|
(\\{2}\w+)\$?)(\\(\w([\w*\s*\d*\(*\)*\\*_*\-*]*)))+(.zip|.ZIP))$)" ControlToValidate="File1"></asp:RegularExpressionValidator>
####################### CODE END ######################