Krystalware
SlickUpload logo

Using SlickUpload in an UpdatePanel

To use the SlickUpload control in an UpdatePanel, do the following steps:

  1. Drop the SlickUpload control inside the UpdatePanel.
  2. Set the AutoUploadOnPostBack="false" attribute on the SlickUpload control. This will keep SlickUpload from automatically trying to upload on every postback of the UpdatePanel.
  3. Add the following javascript to your page (replacing "SlickUpload1" below with the ID of the SlickUpload control):
    function startUpload()
    {
        kw.get("<%= SlickUpload1.ClientID %>").submit();
    }
  4. Call the function in the onclick handler of the button you want to use to trigger the upload. If you are using the OnClientClick attribute, add "return false" to the end of the function to ensure ASP.NET doesn't immediately post back the page. This should look like: OnClientClick="startUpload();return false;"