I am trying to do some validation of some other fields on a page after the user clicks the download button of the ajaxfileupload control. OnClientUploadStart is defined to run before loading starts. and it works. but I want to cancel the download if the verification fails. I tried to do "return false"; but it didn’t work. How can I cancel the download?
if check failed, I want to cancel
function uploadStart(sender, args) { var FileDescription = document.getElementById("FileDescription").value; alert( FileDescription); return false; } <ajaxToolkit:AjaxFileUpload ID="AjaxFileUpload1" ThrobberID="myThrobber" OnUploadComplete="AjaxFileUpload1_UploadComplete" ContextKeys="" OnClientUploadError="uploadError" OnClientUploadComplete="uploadComplete" OnClientUploadStart="uploadStart" AllowedFileTypes="jpg,jpeg,doc,xls" MaximumNumberOfFiles="1" runat="server"/>
source share