|
Rank: Member Groups: Member
Joined: 5/22/2008 Posts: 18
|
After a user uploads a list of files, they can press a Process button the the page. When they process the files, I upload them to a DB for later use and then call the CLearPostedFiles.
I've put the uploader control in an update panel. I call the update on the panel. However, the file list is still on the client side. If you upload a new file, it clears the list and only shows the new file. I'd like the list to be empty after I do the process. Is there any way I can do that? Thanks.
I'm running 5.0.51.2
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
ClearPostedFiles is the right function. Can you try the latest version? If the problem continues, please post a test page and we will look into it as soon as possible.
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/22/2008 Posts: 18
|
the below is the code i have used
Code: HTML/ASPX
<asp:UpdatePanel ID="udpCustomerServiceQuestion" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="738px" AutoPostBack="true"
PostedFileLabelFormat="b> [{posted_file_size} bytes]"
ProgressTextFormat="{transferred} of {total} bytes ({percentage}%)"
AllowedExtension=".txt|.doc|.docx|.xls|.xlsx|.pdf|.jpg|.jpeg|.gif|.png|.tif|.tiff|.bmp|.zip"
ClientSideOnProgress="handleUpload"
ClientSideOnError="eoAJAXUploader_validate_upload"
OnFileUploaded="AJAXUploader1_FileUploaded"
OnInit="AJAXUploader1_Init">
<TextBoxStyle CssClass="file upload" />
<LayoutTemplate>
<%-- CSS class "yui-g" splits the two nested divs into 50% and 50% sections.
See http://developer.yahoo.com/yui/grids --%>
<div class="yui-g">
<div class="yui-u yui-g first ctr-myInfo">
<fac:Container ID="Container1" Clear="both" SkinID="ContainerfieldSet" runat="server">
<HeaderTemplate>Select file to upload</HeaderTemplate>
<ContentTemplate>
<div>
<div class="yui-u firstRow first" style="width:99%">
<asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box PlaceHolder</asp:PlaceHolder>
</div>
<div class="yui-u first" style="width:99%">
<eo:ProgressBar ID="ProgressBar" Width="350px" runat="server" ControlSkinID="Windows_XP"></eo:ProgressBar>
<asp:PlaceHolder ID="ProgressTextPlaceHolder" Visible="true" runat="server">Progress Text PlaceHolder</asp:PlaceHolder>
</div>
<div class="yui-u first lastRow" style="width:99%">
<span class="ctrlBtn hasIcon btnUpload" onmouseover="btnMouse(this,'over')">
<asp:Button ID="UploadButton" runat="server" text="Upload" />
</span>
<span class="ctrlBtn hasIcon btnCancel" onmouseover="btnMouse(this,'over')">
<asp:Button ID="CancelButton" runat="server" text="Cancel" />
</span>
</div>
<div style="clear:Both;"></div>
</div>
</ContentTemplate>
</fac:Container>
</div>
<div class="yui-u">
<fac:Container ID="ctrUpldFile" Clear="both" SkinID="ContainerfieldSet" runat="server">
<HeaderTemplate>Uploaded Files</HeaderTemplate>
<ContentTemplate>
<asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted Files PlaceHolder</asp:PlaceHolder>
<div style="clear:Both;"> </div>
<span class="ctrlBtn" onmouseover="btnMouse(this,'over')">
<asp:Button ID="DeleteButton" runat="server" text="Delete Selected Files" />
</span>
<div style="clear:Both;"> </div>
<div style="clear:Both;font-size:85%;border:1px solid #b9cdde;background-color:#e4ecf3;padding:2px">
<asp:Literal ID="uploadedFileSize" runat="server"></asp:Literal> of <asp:Literal ID="maxFileSize" runat="server"></asp:Literal> MB Uploaded.
</div>
<div style="clear:Both;"></div>
</ContentTemplate>
</fac:Container>
</div>
</div>
</LayoutTemplate>
</eo:AJAXUploader>
<div class="buttonBar clear-both">
<div class="btnHolder">
<asp:button id="btnReset" CssClass="hasIcon btnClear" OnClick="btnReset_Click" runat="server" text="Clear" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Code: C#
protected void btnReset_Click(object sender, EventArgs e)
{
this.AJAXUploader1.ClearPostedFiles();
}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Have you tried the latest version yet? We tested with the latest version and it worked just fine. We had to remove your fac:Container since we do not have it.
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/22/2008 Posts: 18
|
hi
I just found out the problem. we where havind a lot of other controls within that update panel.
once I changed the update panel to eo:callback panel and the button as the triger it worked.
it worked with 5.0.51.2
Thanks for the help.
|
|