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

multiple files, same form data Options
benpearson
#1 Posted : Wednesday, March 17, 2010 6:04:51 PM
Rank: Newbie

Groups: Registered

Joined: 3/17/2010
Posts: 3
Location: Philadelphia

Hi,

I am having problems trying to work out how to get upload two files that have the same form data.

The target it to have the user fill out information and then attach two files to it - one for an 'original document' and the other for a 'translated document'. There is alot of form data that needs to be entered and it pertains to both of the files that are being uploaded.

I have been playing around with file templates, but that appears to only let me specify data per file (not per group of files).

Is there a way that this can be done?

Thanks,
Ben

EDIT: I forgot to mention that it's important to know which file is which.

benpearson
#2 Posted : Wednesday, March 17, 2010 6:37:02 PM
Rank: Newbie

Groups: Registered

Joined: 3/17/2010
Posts: 3
Location: Philadelphia

Hi,

I have (mostly) figured out how to do this:

moved the form data outside of the slickupload control itself
added the individual components: UploadConnector, UploadProgressDisplay, FileSelector (X2)
removed the slickUpload control

This works if I set AutoUploadOnPostBack = true on the UploadConnector. Is there a way I can set this to false? (there are a few other things on the page that cause a postback)

I tried setting "kw.get('UploadConnector1').submit(); return false;" on the OnClientClick event of the button I am using for upload, but it does not seem to find the control (this works when using a slickUpload control, but doesn't appear to with individual components). I also tried replacing the name with <%=UploadConnector1.ClientID %> but to no avail.

Thanks!

Ben

Axosoft
#3 Posted : Wednesday, March 17, 2010 6:55:21 PM
Rank: Administration


Groups: Administrators

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

Setting AutoUploadOnPostBack = false and calling submit should work. Can you send your .aspx and codebehind to chrish at krystalware dot com and I'll take a look?

benpearson
#4 Posted : Friday, March 19, 2010 11:19:37 AM
Rank: Newbie

Groups: Registered

Joined: 3/17/2010
Posts: 3
Location: Philadelphia

Thanks for your emails and your help,Chris.

For the benfit of anyone looking at this thread, moving the UploadConnector1.ClientID out into a Javascript function did the trick.

Incorrect:

<asp:Button ID="btnUpload" runat="server"
    Text="Upload & save" OnClientClick="kw.get("<%=UploadConnector1.ClientID%>").submit(); return false;" />

Correct:

<script language="javascript" type="text/javascript">
    function startUpload() {
        kw.get("<%=UploadConnector1.ClientID%>").submit();
    }
</script>

<asp:Button ID="btnUpload" runat="server"
    Text="Upload & save" OnClientClick="startUpload(); return false;" />

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.