Upload Control not clearing after upload

Last post 01-05-2009, 9:47 PM by ChrisThomas. 7 replies.
Sort Posts: Previous Next
  •  01-04-2009, 10:13 PM 47383

    Upload Control not clearing after upload

    After uploading multiple files the upload controls has empty fields which shouldn't be there
     
     
     
    What would cause this to happen, and how can I force it to clear everything after the upload has been completed.
  •  01-04-2009, 11:30 PM 47384 in reply to 47383

    Re: Upload Control not clearing after upload

    Hi ChrisThomas,
     
     
    Do you use CuteWebUI:UploadAttachments ? Like below:
     
    <CuteWebUI:UploadAttachments ID=attachment1 runat=server></CuteWebUI:UploadAttachments>
     
    If you want to clear all, please use CuteWebUI:Uploader and set MultipleFilesUpload=true. Like below:
     
    <CuteWebUI:Uploader ID=upload1 runat=server MultipleFilesUpload=true></CuteWebUI:Uploader>
     
     
    Regards,
     
    Ken
     
     
  •  01-04-2009, 11:39 PM 47385 in reply to 47384

    Re: Upload Control not clearing after upload

    Yes that is how we are using it. Here's the exact code that is used.
     
            <cutewebui:uploadattachments TableHeaderTemplate="<td></td><td>Files</td><td>Description</td>" TableStyle-Width="400px" ShowFileIcons="true" id="uaMultipleDocuments" runat="server" InsertText="Select files to upload" >
                <INSERTBUTTONSTYLE/>
                <HeaderRowStyle CssClass="Heading" />
                <ItemTemplate><asp:TextBox ID="txtDescription" runat="server"></asp:TextBox></ItemTemplate>
                <ValidateOption MaxSizeKB="20480" />
            </cutewebui:uploadattachments>
  •  01-04-2009, 11:54 PM 47387 in reply to 47385

    Re: Upload Control not clearing after upload

    Hi ChrisThomas,
     
    I am not sure what you mean.
     
    Do you want do not show the table when the upload complete?
     
    Ken
  •  01-05-2009, 12:09 AM 47388 in reply to 47387

    Re: Upload Control not clearing after upload

    Basically what is happening, if the user uploads multiple files, say 3+.
     
    e.g.
     
     
     
     
    Then the user clicks the update button, which moves the files to required directory, and performs some other database updates, etc.

    The user is then presented with the updated page, which has the documents they just upload on it, and other ones they have uploaded previously and the upload panel hidden from the screen. When they click the "Upload Documents" button again.
     
     
    e.g.
     
     
     
     
     
     
    The upload panel is shown again, however the control has some garbage in it from the previous upload
     
     
    e.g.
     
     
     
     
     
    The more files the user has uploaded in the first step, the more of these garbage entries that exist.
     
     
    e.g.
     
     
     
  •  01-05-2009, 12:12 AM 47389 in reply to 47388

    Re: Upload Control not clearing after upload

     
    Further to my previous post, this is what the upload panel should like before the user has uploaded anything
     
     
     
  •  01-05-2009, 7:48 PM 47426 in reply to 47389

    Re: Upload Control not clearing after upload

    Chris,
     
    Can you show me the code of the update button ?
     
    When you move/delete the file , you should call the attachment item's Delete method.
     
    Regards,
    Terry
  •  01-05-2009, 9:47 PM 47441 in reply to 47426

    Re: Upload Control not clearing after upload

    Thanks for that. I just added DeleteAllAttachments() after processing the files and the control is working properly again.
     
    Cheers,
     
    Chris
View as RSS news feed in XML