在AjaxFileUplaod控件中禁用上载按钮 [英] Disable Upload Button in AjaxFileUplaod Control

查看:70
本文介绍了在AjaxFileUplaod控件中禁用上载按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





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



谢谢&问候



Harikrishna

Hi,

I am working with AjaxFileUpload control. I want to disable Upload button when file is uploaded. Again i am selecting file or drag drop file to Dropzone then display Upload button. Please tell me the solution to resolve this problem.

Thanks & Regards

Harikrishna

推荐答案

您可以使用javascript上传完成后禁用文件上传按钮

You can disable file upload button after upload complete using javascript
<ajaxToolkit:AsyncFileUpload
            OnClientUploadError="uploadError" OnClientUploadComplete="uploadComplete"
            runat="server" ID="AsyncFileUpload1"    />
    <script type="text/javascript">

        function uploadError(sender, args) {

        }
        function uploadComplete(sender, args) {
document.getElementById("yourButtonID").disabled = true;

                    }
    </script>



希望这有帮助


Hope this helps






请查看以下链接:



1.链接仅供参考

2.链接而不是禁用按钮你可以显示进度条。



http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AjaxFileUpload/AjaxFileUpload.aspx [ ^ ]



http://csharpdotnetfreak.blogspot.com/2012/08/aspnet-ajaxfileupload-control-dragdrop- progress-bar.html [ ^ ]


这篇关于在AjaxFileUplaod控件中禁用上载按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆