AsyncFileUpload question.



  • Morning all.

    Im hopefull that some one here will have a quick simple answer to this, its been doing my head in for the last hour or so...

     

    Basically I have a page containing an async file upload control and a listview.

     

    In the code behind I have a Dictionary<string, string> which is being persisted.

    When a file is uploaded it is saved to disk and then the dictionary is updated with the file name and path.

     

    What I then do is bind the dictionary to the list view.

     

    Basically the issue is that the list view that is rendered is simply not updated, because the file upload is async however my question is:
    Is there a way to get this list view to update?
    Ideally I dont want to get into using the client side onUploadComplete...

     

    Any thoughs on this anyone?

     

    Thanks



  •  Implement a observer that polls the server every so many seconds (after you've uploaded a file obviously) to see if new files are uploaded. Let your listview register with the observer object to get called when it needs to refresh.



  • @stratos said:

     Implement a observer that polls the server every so many seconds (after you've uploaded a file obviously) to see if new files are uploaded. Let your listview register with the observer object to get called when it needs to refresh.

     

    Interesting, thanks Ill look into that.

    At the moment I have gone back to the old school, used the standard file upload control and am putting up with the postback!


Log in to reply