validate asp fileupload control client side
i have a asp fileupload control on my page. how to validate the selected file on client side. validation rules: 1. file must be jpeg,png,bmp or gif. 2. file size must be within 25 kb and 2 mb. please help. thanks. I Have Tried The Following Code to validate the extension <asp:FileUpload ID="FileUpload2" runat="server"/> <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="ValidateFileUpload" ErrorMessage="Invalid file type. Only .gif, .jpg, .png, .bmp and .jpeg are allowed." ControlToValidate="FileUpload2" ValidationGroup="update"> </asp:CustomValidator> <script