Rank: Newbie Groups: Member
Joined: 4/8/2009 Posts: 5
|
Hi,
I have a simple test application I've built in which I am using the 'ClientSideOnDone' attribute to call a JS method which triggers an ASP.net button. I want to get the uploaded file name, but the PostedFiles.Length = 0. What am I doing wrong?
Thanks,
TML
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You need to delay the post back until after ClientSideOnDone has returned. Try do something like this:
Code: JavaScript
function on_uploader_done()
{
setTimeout(
function()
{
//call your code
}, 100);
}
Note it uses setTimeout to delay the execution of your code and allow on_uploader_done to return normally so that the uploader can finishes up updating its internal data. Thanks!
|