如何在asp.net.net中使用更新进度,还告诉我如何在按钮的click事件中使用线程. [英] how to use update progress in the asp.net.and also tell me how to use thread at the click event of button.

查看:134
本文介绍了如何在asp.net.net中使用更新进度,还告诉我如何在按钮的click事件中使用线程.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在asp.net中使用更新进度,还告诉我如何在按钮的click事件中使用线程.例如,如果我正在搜索任何内容,则应显示搜索进度时. 1件事system.threading.sleep(1000);我不想使用此行.进度应根据搜索...请帮助我.

how to use update progress in the asp.net.and also tell me how to use thread at the click event of button.for example if i am searching anything then at the time of searching the progress should be shown.and also 1 thing system.threading.sleep(1000); i don''t want to use this line.progress should be according to searching...plz help me.

推荐答案

<asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="300">
    </asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <contenttemplate>
        Write your design code here...
   </contenttemplate>
</asp:updatepanel>

<asp:UpdateProgress ID="UpdateProgress100" runat="server" DisplayAfter="1">
        <ProgressTemplate>
           
            <img src="../Images/loadingsmall.gif" alt="X" title="Please Wait" />
                        
        </ProgressTemplate>
    </asp:UpdateProgress>



现在无需编写system.threading.sleep(1000);在.cs页上.进度将根据应用程序的耗时而定.

希望对您有帮助.
如果有帮助,请不要忘记将其标记为答案. :)



Now there is no need to write system.threading.sleep(1000); on the .cs page. Progress will be according to time consuming of application.

Hope it''ll help you.
Don''t forget to mark as answer if it helps. :)


这篇关于如何在asp.net.net中使用更新进度,还告诉我如何在按钮的click事件中使用线程.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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