Re: Using AjaxUploader with jQuery AJAX and ASP.NET

  •  04-09-2009, 6:03 AM

    Re: Using AjaxUploader with jQuery AJAX and ASP.NET

    Hi Terry,
     
    That makes things substantially easier - thanks!  I'd actually rather not do a postback at all; I just want the user to upload file, then see a "thanks" message without submitting the whole form until they've filled out the rest of the page.
     
    To get things started, I simply added a:
     
    function CuteWebUI_AjaxUploader_OnPostback() {
       alert($(
    '#filePhoto'
    ).val());
       return false
    ;
    }

    ...which has successfully stopped the postback.  Because server-side, there's no .value on the uploader control, I've just used Request[uploader.ClientID] which displays me a forwardslash-separated list of GUIDs, all good.

    Unfortunately, the only thing missing is the files - they don't appear have to have saved to disk anywhere.  I was hoping they'd still be in UploaderTemp, so I could just use that to copy them to their new location. 

    I've tried doing an AJAX call from within the _OnPostback() to a FileUploaded page method with the (object sender, UploaderEventArgs e) signature which is the obvious solution, but I can't work out the structure of the UploaderEventArgs from JavaScript.

    Any hints on that one?
View Complete Thread