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

more than one submit button on page Options
dnikolov
#1 Posted : Wednesday, March 26, 2008 1:15:39 PM
Rank: Newbie

Groups: Registered

Joined: 3/26/2008
Posts: 2

On the same page where I have the upload control I have two buttons. One that has no OnClick or other wire-up which is supposed to act as the 'Upload' button, and one that has an OnClick event that does something unrelated to the upload control. If I choose 'Browse', select a file and click the second button, the upload still goes forward. Is there any way to explicitly specify which button should act as the Upload button?

I don't want to have to check the sender in OnUploadComplete, b/c I don't want the user to see any progress bar at all. Seems like a very simple issue. Am I missing something?

ChrisHynes
#2 Posted : Thursday, March 27, 2008 7:27:19 AM
Rank: Administration


Groups:

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

Are both buttons posting back? Unfortunately, the browser will upload the entire page in one chunk when you post. You

The only thing you can do is to use the AutoUploadOnPostBack property to disable automatic form submission, and call the SlickUpload_Submit() function in the onclick of your upload button. But that means that if a user selects a file, then clicks the other button instead of the upload button, they will loose the file they selected and have to choose it again. Will that work for your scenario?

Note: if you're using a asp:Button server control, with the OnClientClick property, it should read:

OnClientClick="SlickUpload_Submit();return false;"

so as to escape out of the ASP.NET submit code.

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.