0

我正在使用 AjaxFileUpload 控件。我想在上传文件时禁用上传按钮。我再次选择文件或将文件拖放到 Dropzone,然后显示上传按钮。请告诉我解决此问题的解决方案。

4

1 回答 1

0

You can do that by using a HiddenField variable.One the file is uploaded set the value to true.And in Aspx page have a simple setInterval(function () { var IsExpand = $('#hdnIsUploaded').val() == "1" ? true : false; $("input[type=file]").attr("disabled", "disabled"); }, 10000);

or The second one you can call from c#,which is more efficient. In the disable JavaScript function simple disable the control. ScriptManager.RegisterStartupScript(this, GetType(), "Disable", "Disable();", true);

于 2013-04-25T05:32:54.713 回答