After upload

Last post 04-02-2009, 9:18 AM by Anonymous. 5 replies.
Sort Posts: Previous Next
  •  04-01-2009, 10:04 AM 50610

    After upload

    Hi,

    I've got everything working well with the AjaxUploader, I'm uploading the images, renaming them to match my current naming standards and creating a new record for each in my MS SQL database table, but after all images are uploaded, I'd like to redirect the user to another page where I can then as them to enter the title for each image and select a category for it to show in.
     
    Is that possible?  I can seem to figure out a way to either action an event on all uploaded or to check if there are still files in the queue either waiting or being processed.
     
    Kind regards,
     
    Rich
  •  04-01-2009, 1:26 PM 50627 in reply to 50610

    Re: After upload

    Rich,
     
    Please use the OnPreRender event.
     
    for example:
     
    int fileuploadcount=0;
    uploader_FileUploaded(...)
    {
        fileuploadcount++;
    }
    uploader_PreRender(...)
    {
       if(fileuploadcount>0)
          Response.Redirect(...);
    }
     
    Regards,
    Terry
     
     
  •  04-01-2009, 6:26 PM 50663 in reply to 50627

    Re: After upload

    Brilliant, thanks Terry, I appreciate your help, it worked a treat :)  Below is the code converted to VB if anyone else needs it:
    1. Public Sub Attachments1_AttachmentAdded(ByVal sender As ObjectByVal args As CuteWebUI.AttachmentItemEventArgs)   
    2.         fileuploadcount += 1   
    3. End Sub  
    4.   
    5. Public Sub Attachments1_PreRender(ByVal sender As ObjectByVal e As System.EventArgs)   
    6.         If fileuploadcount > 0 Then  
    7.             Response.Redirect("photos_uploaded.aspx")   
    8.         End If  
    9. End Sub  
    Kind regards,
     
    Rich
  •  04-01-2009, 6:32 PM 50664 in reply to 50663

    Re: After upload

    Oh yeah, forgot the below too:
    1. Shared fileuploadcount As Integer = 0  
  •  04-01-2009, 11:14 PM 50670 in reply to 50664

    Re: After upload

    Hi,
     
    Please do not use the 'Shared' keyword.
     
    Regards,
    Terry
     
  •  04-02-2009, 9:18 AM 50691 in reply to 50670

    Re: After upload

    Hi Terry,
     
    Thanks for the warning, I just changed it to a straight Dim.
     
    Kind regards,
     
    Rich
View as RSS news feed in XML