ARTICLE

Using UpdateProgress Control in AJAX

Posted by Prashanth Chindam Articles | AJAX in C# January 22, 2011
This is a sample program demonstrating UpdateProgress Control.
Reader Level:
Download Files:
 

Design: 

1.gif
 
Place ScriptManager control (from 'Ajax Extensions' tab) on the form

Place one UpdatePanel control

In this UpdatePanel control, place one Login control and one label

Place one UpdateProgress control

In this UpdateProgress control, place one Image control and one label

Right click on application in solution explorer-> Add Existing Item-> select a progress bar gif image.

Set 'ImageUrl' property of Image control to locate progress bar gif image

2.gif
 
Set 'AssociateUpdatePanelId' property of UpdateProgress1 control as 'UpdatePanel1'

Code:

using System;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        LabelMsg.Text = "";
    }
    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        System.Threading.Thread.Sleep(3000);
        LabelMsg.Text = "valid user";
    }
}

Output: 
 
3.gif 

4.gif

Login to add your contents and source code to this article
post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts