HOWTO: update label in Upload.Uploaded

Not Answered This post has 0 verified answers and 7 replies

tec-support@deceuninck.com Posted: Mon Mar 29, 2010 @ 4:20 AM

Hi,

 

I'm trying to update an asp.net label from server-side code, after an upload has completed. I've tried setting the text property in the uploaded event, but with IsCallback being through, I suppose it has no access to that property. It's not updating it, that's all I know...

 

Now do I need a callback for this? how do I accomplish this?

 

Thanks in advance.

All Replies

Top 10 Contributor
Posts: 6,149
stephen Posted: Mon Mar 29, 2010 @ 11:44 AM

If I'm understanding you correctly you want to change the value of a label when the upload is complete. If that's the case, then you're right- you can't do this during the uploads callback, as that callback can't modify controls on the page. If you want to do this, you can wire up the client uploadend event to fire a function / callback to do this (or you could just do this notification client entirely, if that's an option for your application).

Stephen Hatcher, Developer Support Manager
tec-support@deceuninck.com Posted: Tue Mar 30, 2010 @ 1:05 AM
that's getting close, except that the callback fires before the Uploaded event. Is there any way to fire it after the serverside Uploaded event has fired?
tec-support@deceuninck.com Posted: Tue Mar 30, 2010 @ 1:15 AM
to fire the callback after the serverside upload event, i mean
tec-support@deceuninck.com Posted: Tue Apr 20, 2010 @ 7:17 AM
Hi, it's been two weeks without getting an answer here. Care to follow-up?
Top 10 Contributor
Posts: 6,149
stephen Posted: Tue Apr 20, 2010 @ 7:27 AM

So you're calling the callback in the uploadend event, and it's firing before upload starts on the server? You may run into an issue here with these events: the client side uploadend event fires before the server side uploaded event completes (because the client event is done, essentially).  That's a known issue. You might workaround this by using callback to poll the server to see if the files are present in the property folder. Does that make sense?

 

Stephen Hatcher, Developer Support Manager
tec-support@deceuninck.com Posted: Tue Jun 8, 2010 @ 12:32 AM
I cannot verify this as of today because of changed priorities. Thank you for your time anyway.
Not Ranked
Posts: 9
Florence5387 Posted: Mon Jan 17, 2011 @ 11:21 PM
hi,
I am in similar situation and I tried your suggestion.i.e. using a callback or client function in uploadend client event handler to poll for upload completion.

Polling part is getting triggered before onuploaded server side event and the code is struck in an infinite polling.

Any other ideas?
Page 1 of 1 (8 items)