SlickUpload
Welcome Guest Search | Active Topics | Log In | Register

AutoUploadOnPostBack=False Options
mzak
#1 Posted : Tuesday, January 22, 2008 9:39:26 AM
Rank: Newbie

Groups: Registered

Joined: 12/5/2007
Posts: 6
When I set this attribute and upload a file or files, I no longer receive the upload confirmation screen.
ChrisHynes
#2 Posted : Tuesday, January 22, 2008 9:35:26 PM
Rank: Administration


Groups:

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ
When you turn auto uploading off, you need to manually trigger the upload process by calling the SlickUpload_Submit() function from a client side click handler. This javascript method will kick off the upload and then post back the entire page when the upload is complete.
mzak
#3 Posted : Saturday, February 02, 2008 2:05:03 PM
Rank: Newbie

Groups: Registered

Joined: 12/5/2007
Posts: 6

Chris,

Is there anything else I have to do other than the following two steps?

  1. set the AutoUploadOnPostBack=False on the UploadManager instance
  2. set the OnClientClick event handler to fire the SlickUpload_Submit() function on an object such as a button to trigger the upload

I have a functioning site that has 2 controls, your SlickUpload control and an asp:LoginStatus control.  Everything functions great except when the user clicked the asp:LoginStatus control a page postback is triggered and if any files are selected, it causes the upload to proceed (despite the user clicking "Log Out").  Perfect scenario to use the AutoUploadOnPostBack=False, right?

I had performed the two steps from above in my development environment and now the confirmation screen acts as if it calls the restartButton_Click function after a very short delay because it flashes on the screen for a moment only to be redirected to a new upload (as if the user would click on the "New Upload" button I have in the uploadResultsPanel which calls restartButton_Click in the server-side click routine).

After testing this many times I noticed that sometimes I received the uploadResultsPanel content and I was required to click the "New Upload" button --good-- but other times I was immediately redirected to the new upload --bad--.  I think the sporadic nature of this is causing me to go crazy!  Additionally, when I do see the uploadResultsPanel content, sometimes the files are uploaded, sometimes they are not (my length reports 0 bytes even though I select files that have successfully uploaded before -- note, I have the files set to overwrite in the web.config).

I can post the site on a server so you can experience this or send you my code.  Our licensed copy of the control is used on a secure site with the default value for AutoUploadOnPostBack (True) for the sake of functionality.

ChrisHynes
#4 Posted : Tuesday, February 05, 2008 9:47:24 AM
Rank: Administration


Groups:

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ
No, that should work perfectly. Can you email me the page and codebehind to chrish@krystalware.com?
ChrisHynes
#5 Posted : Friday, February 08, 2008 3:27:22 PM
Rank: Administration


Groups:

Joined: 7/7/2005
Posts: 1,586
Location: Scottsdale, AZ

Try following the instructions I just posted here: Post: Upload was cancelled to tweak the OnClientClick event code.

mzak
#6 Posted : Friday, February 08, 2008 4:04:17 PM
Rank: Newbie

Groups: Registered

Joined: 12/5/2007
Posts: 6

Chris,

Running some quick tests here, that seems to have resolved the issue.  Thanks!

I appreciate the fast response as well.

mzak

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.