FileUpload control inside an UpdatePanel without refreshing the whole page?

前端 未结 7 1771
太阳男子
太阳男子 2020-11-30 09:49

According to Microsoft the FileUpload control is not compatible with an AJAX UpdatePanel.

I am aware that a PostBackTrigger can be added to the submit button of the

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 10:46

    Add this to your button control:

    OnClientClick="javascript:document.forms[0].encoding = 'multipart/form-data';"
    

    -or-

    Make your page Form tag look like:

提交回复
热议问题