SlickUpload automatically processes on each postback by default. It won't show the progress display if no files were selected, but it will still process. To turn this off and kick off the upload only when you want it:
- Set the AutoUploadOnPostBack="false" attribute on the SlickUpload control.
- Add the following javascript on the page (replacing SlickUpload1 with whatever the ID of your control is):
function startUpload()
{
kw.get("<%= SlickUpload1.ClientID %>").submit();
}
- To trigger the upload, call the startUpload function. You'll need to append ;return false; to disable ASP.NET's default postback handling like this:
OnClientClick="startUpload();return false;"
You don't have to use the OnUploadComplete event to handle uploads -- on any upload request, you can access the upload status (including the list of files that were uploaded) via the UploadStatus property.