Confirmation Page after uploads?

Last post 05-18-2009, 2:51 AM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  05-15-2009, 11:17 AM 52194

    Confirmation Page after uploads?

    How could I send a user to a confirmation page after ALL file uploads are completed?
     
    Right now i am trying to do some logic on the FileUploaded procedure:
     

    If uploadcount = Uploader1.Items.Count - 1 Then

    Response.Redirect("Thanks.aspx")

    End If
     
    However... this is not working!
     
    Any thoughts???
  •  05-15-2009, 3:04 PM 52209 in reply to 52194

    Re: Confirmation Page after uploads?

    Please try the following code:
     
    1. <%@ Page language="c#"%>   
    2. <%@ Register Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" TagPrefix="CuteWebUI" %>   
    3.   
    4. <script runat="server">       
    5.     protected override void OnInit(EventArgs e)   
    6.     {   
    7.         base.OnInit(e);   
    8.         Uploader1.FileUploaded += new UploaderEventHandler(Uploader_FileUploaded);   
    9.     }   
    10.   
    11.     void Uploader_FileUploaded(object sender, UploaderEventArgs args)   
    12.     {   
    13.         Uploader uploader = (Uploader)sender;   
    14.         Response.Redirect("http://google.com"false);   
    15.   
    16.     }   
    17. </script>   
    18. <html>    
    19. <head>   
    20. </head>   
    21. <body>   
    22.     <form id="Form1" method="post" runat="server">   
    23.     <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertText="Upload File (Max 10M)">   
    24.         <VALIDATEOPTION MaxSizeKB="10240" />   
    25.     </CuteWebUI:Uploader>   
    26.     </form>   
    27. </body>   
    28. </html>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-18-2009, 2:51 AM 52261 in reply to 52194

    Re: Confirmation Page after uploads?

    Hi,
     
    For multiple files, you can use OnPreRender event :
     
    int _filecount=0;
    void Uploader_FileUploaded(object sender, UploaderEventArgs args)   
    {
    //process the file..
    _filecount++;
    }
    void OnPreRender(EventArgs e)
    {
    base.OnPreRender(e);
    if(_filecount>0)Response.Redirect("thanks.aspx");
    }
View as RSS news feed in XML