TML:
If you are using AJAX , you can just hide the uploader of the FileUploaded event.
If not, this code may help you :
- <%@ Page Language="C#" %>
- <%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <script runat="server">
- protected void Uploader1_FileUploaded(object sender, UploaderEventArgs args)
- {
- //args.MoveTo(...)
- servermsg.Text = args.FileName + " have been uploaded";
- Uploader1.Visible = false;
- }
- </script>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title>Sample</title>
- <script type="text/javascript">
- var selectedlist;
- function CuteWebUI_AjaxUploader_OnSelect(list)
- {
- selectedlist=list;
- }
- function CuteWebUI_AjaxUploader_OnPostback()
- {
- document.getElementById("uploadedmsg").innerHTML=selectedlist[0].FileName+" is uploaded";
- this.internalobject.insertBtn.style.display="none";
- return false;
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:Label runat="server" ID="servermsg" ForeColor="red" Font-Bold="true" />
- <span id="uploadedmsg"></span>
- <CuteWebUI:Uploader runat="server" ID="Uploader1" OnFileUploaded="Uploader1_FileUploaded" />
- <hr />
- <asp:Button runat="server" ID="SubmitButton" Text="Submit" />
- </div>
- </form>
- </body>
- </html>
Regards,
Terry