how to do client side validation for AsyncFileUpload in asp.net
I tried the validator with file upload and it works fine but for AsyncFileUpload i get a error
Control 'AsyncFileUpload1' referenced by the ControlToValidate property of 'RegularExpressionValidator1' cannot be validated.
is there any method by which I can do validation before uploading the file. Thanks
<asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" UploadingBackColor="Yellow" OnUploadedComplete="ProcessUpload" OnClientUploadComplete="showUploadConfirmation" ThrobberID="spanUploading" /> <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Only zip file is allowed!" ValidationExpression="^.+(.zip|.ZIP)$" ControlToValidate="AsyncFileUpload1"> </asp:RegularExpressionValidator>
So my conclusion is that it may not be possible.