How do I run a client side progress bar and percentage value according to the work completed on the server?
I am using vb.net 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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Progress Bar</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<eo:ProgressBar ID="ProgressBar1" runat="server" Width="250px" BorderColor="Black"
BorderStyle="Solid" BorderWidth="1px" ControlSkinID="None" CssBlock="<style type="text/css">
</style>" ShowPercentage="True" BackgroundImage="00060201"
BackgroundImageLeft="00060202" BackgroundImageRight="00060203"
IndicatorImage="00060204" IndicatorIncrement="8">
</eo:ProgressBar>
<asp:Timer ID="Timer1" runat="server" Interval="500">
</asp:Timer>
<asp:Label ID="Label1" runat="server" Text="0"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
------------------------------------------------
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)
Else
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.