Welcome Guest Search | Active Topics | Sign In | Register

AjaxUpload only 1 file Options
Alex K
Posted: Tuesday, August 14, 2007 7:46:55 AM
Rank: Member
Groups: Member

Joined: 8/2/2007
Posts: 12
Hi,
I`d like to allow user upload only 1 file! How can I realize this? If upload second first must be deleted!
Thanks!
eo_support
Posted: Tuesday, August 14, 2007 8:20:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Alex,

You can set AutoPostBack to true, this way as long as user finishes uploading, your server side FileUploaded event will be fired. Inside that event you can set the uploader's Visible to false.

Thanks
Alex K
Posted: Wednesday, August 15, 2007 1:46:43 AM
Rank: Member
Groups: Member

Joined: 8/2/2007
Posts: 12
Hello support,
The problem is that I create my Upload control dynamicly! Can I use any Client events to manipulate with Upload Control?
Thanks!
eo_support
Posted: Wednesday, August 15, 2007 6:34:15 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Alex,

No. You won't be able to. You would have to go back to the server to disable/hide it. Creating Upload control dynamically shouldn't be a problem though. You just create them, upload and go back to the server ----- and this time you don't create them. This way when the page is reloaded on the client side the user won't see uploader control because there isn't any.

Thanks
Alex K
Posted: Wednesday, August 15, 2007 7:46:22 AM
Rank: Member
Groups: Member

Joined: 8/2/2007
Posts: 12
Hi Support,
Can I catch event UploadButton(part of UploadControl) if I create UploadControl dynamically? I wish to disable UploadButton when 1 file is uploaded and enable it if file deleted using DeleteButton!
Is it possible?
Thanks for your attention!

eo_support
Posted: Wednesday, August 15, 2007 7:58:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Alex,

I have already told you what the only solution is. :) That solution works in your scenario and I do not see any other easy way to do it. UploadButton and DeleteButton will not work. You can not reliably attach handler to them because the uploader tries to attach them at the same time.

Thanks
Alex K
Posted: Wednesday, August 15, 2007 8:19:21 AM
Rank: Member
Groups: Member

Joined: 8/2/2007
Posts: 12
Hi support,
Thanks for your work...
eo_support
Posted: Wednesday, August 15, 2007 8:33:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Alex,

Not a problem. We will probably try to add a property on our side to limit the number of files to be uploaded in our future version and also if possible, make the uploader to work with validators.

Thanks


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.