how to clear the textbox value of asyncfileupload

2019-06-24 05:39发布

There is one button(MyButton). OnClick of this button a modalpopup(MyPopup) appears with one asyncfileupload ajax control, Ok button and Cancel button.

The browse functionality of the asyncfileupload functionality is working fine, No problem. But after postback, if I click the MyButton again, the popup appearing with the previous path in the asyncfileupload control's textbox.

How to clear it ... !

Thanks in advance.

7条回答
地球回转人心会变
2楼-- · 2019-06-24 06:12

To expand ador's answer above:

function uploadComplete(sender, args) {
    var uploadField = $(sender.get_element()).find("input[type='file']");
    uploadField[0].form.reset();
    uploadField.each(function () { $(this).css("background-color", "white"); });
}
查看更多
登录 后发表回答