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

Repeater Item Command & Hiding FileSelector text Options
ChrisRoberts
#1 Posted : Friday, February 19, 2010 9:36:46 AM
Rank: Newbie

Groups: Registered

Joined: 2/19/2010
Posts: 2
Location: UK

Hi

We have a page with two fileselectors and two file lists. The page has two submit buttons either of which should initiate the upload and cause a postback. This works fine.

The issue is that we have 2 repeaters which list files that have been uploaded and stored in the database which do not seem to be able to cause a postback. Each repeater has a link button in its item template with a commandName of "RemoveEpc" and "RemoveImage" each of which should cause a postback so that the selected file can be deleted from the database. The postback isnt working, nothing happens when you click on the link.

The second issue is how can we hide the fileselector text when the database already contains the maximum number of files?

Kind Regards

Chris

Axosoft
#2 Posted : Monday, February 22, 2010 8:11:14 AM
Rank: Administration


Groups: Administrators

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

I'm thinking you need to set AutoUploadOnPostBack="false" and then trigger the uploads manually in the submit button click events. I want to take a look at what you've got first so I can make sure my recommendation makes sense. Can you send your .aspx and codebehind to chrish at krystalware dot com so I can take a look?

Axosoft
#3 Posted : Tuesday, February 23, 2010 10:37:52 AM
Rank: Administration


Groups: Administrators

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

First, find attached the latest build -- it has much improved support for ASP.NET AJAX and UpdatePanels in particular. It will be officially released later this week after final QA.

Secondly, if SlickUpload lives in the same form with an UpdatePanel (whether it is the SlickUpload control or UploadConnector control), you need to set AutoUploadOnPostBack="false" and then upload manually. See the "Control when upload occurs" topic in the SlickUpload control documentation. This is required because ASP.NET AJAX uses the same form to do partial page postbacks, so SlickUpload's AutoUploadOnPostBack hook will interfere with normal ASP.NET AJAX partial page postbacks.

 

File Attachment(s):
SlickUpload-5.4.3.zip (55kb) downloaded 2 time(s).
ChrisRoberts
#4 Posted : Thursday, February 25, 2010 11:25:22 AM
Rank: Newbie

Groups: Registered

Joined: 2/19/2010
Posts: 2
Location: UK

Hi

This has resolved the first issue but i am still having a few issues.

When a file is removed from the update panel repeater it goes through some code that increases the number of MaxFiles allowed but this does not seem to affect the control. e.g. maxfiles is set to 9 when there are no files saved. if there are 2 files saved then the maxfiles is set to 7 by the code on load. if i then remove one of the saved files the code runs to set the maxfiles to 8 but the fileselector still only allows 7.

I also still have a problem with when i have maxfiles set to 0 due to there being 9 saved files. the fileselector is visible and allows the upload of 1 file. is it possible to hide the fileselector?

 

Axosoft
#5 Posted : Thursday, February 25, 2010 1:29:49 PM
Rank: Administration


Groups: Administrators

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

We've set up a test page with an UpdatePanel that increases and decreases MaxFiles, and it works here, so this issue must have something to do with your specific environment. Everything is in the same UpdatePanel which is being posted back when files are removed, correct? Can you send me the .master and its codebehind so I can put together an identical environment? Also send the .aspx and codebehind if those have changed since the version you sent me.

I've also attached the latest build which will be released later this week -- it has a few bug fixes that could possibly affect the issue, but I rather doubt it.

You should be able to hide the FileSelector (and FileList) by setting them to Visible = false.

File Attachment(s):
SlickUpload-5.5.zip (55kb) downloaded 1 time(s).
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.