Cancel upload via js or code behind?

Last post 02-03-2009, 9:58 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  10-16-2008, 10:09 PM 44949

    Cancel upload via js or code behind?

    Hi.  Great control!  I would like to know is if there is a way to manually cancel the upload either via javascript or in my code behind.  The reason for this is that the upload control is in an ajax modal window and if the user closes the window while the component is uploading and then reopens the window and uploads again, they get an "Upload is processing.." box.  I want to cancel the upload when the modal window is closed if the user hasn't done so first.   Thanks!
  •  10-18-2008, 11:10 PM 44968 in reply to 44949

    Re: Cancel upload via js or code behind?

    Hi,
     
    You can try:
     
    var uploader=document.getElementById('<%=Uploader1.ClientID%>')
    uploader.cancelall();
     
    Regards,
    Terry
  •  01-30-2009, 1:58 PM 48239 in reply to 44968

    Re: Cancel upload via js or code behind?

    is there a vb.net code behind version of this cancelall()?
  •  02-03-2009, 9:58 PM 48335 in reply to 48239

    Re: Cancel upload via js or code behind?

    Hi,
     
    You can't cancel the ajaxuploader at server side because while the files being uploaded, the server code is not executing.
     
    Regards,
    Terry
View as RSS news feed in XML