Welcome Guest Search | Active Topics | Sign In | Register

How Do I Get The Uploaded File Name on the Server Side (C#) Options
TML
Posted: Wednesday, April 8, 2009 3:42:04 PM
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
eo_support
Posted: Wednesday, April 8, 2009 3:58:32 PM
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!


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.