How to use Ajax UpdateProgress Control in Asp.net - Free Asp.Net,MVC,AngularJs,Jquery,Javascript,Sql Server,WCF,Entity framework snippets and tutorial

How to use Ajax UpdateProgress Control in Asp.net


Introduction: In this post I will explain you we can use the Ajax Updateprogress control in Asp.net.
Description:
Open Visual Studio>File>New>Website. After that Add a new webform to website>Go to Toolbox>Ajax Extensions.
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
      
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
         <ContentTemplate>
         <asp:Button ID="btnupdate" runat="server" Text="Update" onclick="btnupdate_Click" />
         </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
        <img src="Uploaded_Image/please-wait.gif" />
        </ProgressTemplate>
        </asp:UpdateProgress>
Now double click on button, which redirect you to .aspx.cs page. Add namsapce.
using System.Threading;

protected void btnupdate_Click(object sender, EventArgs e)
    {
        Thread.Sleep(3000);
    }
In VB

Imports System.Threading

Protected Sub btnupdate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnupdate.Click
        Thread.Sleep(2000)
    End Sub
Run the project and check the result.


What do you think about this article?

If you found this article useful, please share and follow on Facebook, Twitter, Google Plus and other social media websites. To get free updates subscribe to newsletter. Please put your thoughts and feedback in comments section.

Share this

Share on FacebookTweet on TwitterPlus on Google+


EmoticonEmoticon