ASP.NET FileUpload: how to automatically post back once a file is selected?

后端 未结 2 1933
故里飘歌
故里飘歌 2021-02-05 03:55

I am working on a ASP.NET app and i have a need to post back to the server after a file is chosen in a FileUpload control without having to have the user explicitly click a \'su

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 04:30

    I'm assuming you want to make the upload start right away. If so, you should react to the change event in JavaScript, and simply make it submit the form.

    
    
    

    Asking the users for confirmation is recommendable, so they stay in control of the process and can cancel if they chose the wrong file by accident.

提交回复
热议问题