Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I run a client side progress bar and percentage value according to the work completed on the server?

I am using for this, My progressbar.aspx file look like:--

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="EOProgressBar.aspx.vb" Inherits="EOProgressBar" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <title>Progress Bar</title>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">


            <eo:ProgressBar ID="ProgressBar1" runat="server" Width="250px" BorderColor="Black"
            BorderStyle="Solid" BorderWidth="1px" ControlSkinID="None" CssBlock="&lt;style type=&quot;text/css&quot;&gt;
&lt;/style&gt;" ShowPercentage="True" BackgroundImage="00060201"
                BackgroundImageLeft="00060202" BackgroundImageRight="00060203"
                IndicatorImage="00060204" IndicatorIncrement="8">

    <asp:Timer ID="Timer1" runat="server" Interval="500">
        <asp:Label ID="Label1" runat="server" Text="0"></asp:Label>






my progressbar.aspx.vb is:--

Partial Class EOProgressBar
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    End Sub

    Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        If Label1.Text < 101 Then
            Label1.Text = CStr(CInt(Label1.Text) + 1)
            Timer1.Enabled = False
        End If
        ProgressBar1.Value = Label1.Text
    End Sub
End Class

I am using update panel too.
I have used the timer to fill the value of progress bar, but inspite of that I have to write the code according to the process status running on the server.
How do I do this?
Any ideas, plese help me.
Thanks in advance.
Updated 18-Feb-11 0:38am
Dalek Dave 7-Feb-11 4:42am    
Edited for Grammar and Readability.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900