1 Replies - 1034 Views - Last Post: 01 May 2015 - 08:48 AM

#1 RustyAMcM  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 192
  • Joined: 21-January 15

Progress Bar?

Posted 27 April 2015 - 07:31 AM

I have a web page in which I have a pace per hour that different items are supposed to be run I also have the current pace that the machine is running on said Item and I have a field that I have calculated the % of Pace now what I want to try to do is make a progress bar that would show the % of pace that the operator is currently running and I have no Idea how to accomplish this I have seen examples of progress bars but no explanation as to how to build or attach fields to one. Does anyone know how if so could you give me a brief tutorial so I can work out what I need?

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Progress Bar?

#2 RustyAMcM  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 192
  • Joined: 21-January 15

Re: Progress Bar?

Posted 01 May 2015 - 08:48 AM

!!!!Update!!!!

I managed to get this working with the following code in asp.net

<asp:Label id="AirReady" runat="server"></asp:Label>
<asp:Panel id="panelBarSide" runat="server" Width="300px" BorderStyle="Solid" BorderWidth="1px"
ForeColor="Silver">
<asp:Panel id="panelProgress" runat="server" Width="10px" BackColor="#8200D9" Height="20px"></asp:Panel>
</asp:Panel>
<asp:Label id="ReadyPercent" runat="server" ForeColor="Blue"></asp:Label>
                    &nbsp;
                    <asp:Label id="AirRun" runat="server"></asp:Label>
<asp:Panel id="panel1BarSide" runat="server" Width="300px" BorderStyle="Solid" BorderWidth="1px"
ForeColor="Silver">
<asp:Panel id="panel2Progress" runat="server" Width="10px" BackColor="#FF24FF" Height="20px"></asp:Panel>
</asp:Panel>
<asp:Label id="RunPercent" runat="server" ForeColor="Blue"></asp:Label>


And The Following VB.Net on the back end

Try
                If e.Row.Cells(3).Text = "&nbsp;" Then
                    GoTo thisline
                End If

                state = (e.Row.Cells(3).Text)
                '/ e.Row.Cells(6).Text) * 100

                If (Session("State") Is Nothing) Then
                    state = Convert.ToInt32(Session("State").ToString())
                Else
                    Session("State") = 0
                End If
thisline:
                If state > 0 AndAlso state <= 100 Then

                    Me.AirReady.Text = "Ready..."
                    Me.panelProgress.Width = state * 3
                    Me.ReadyPercent.Text = state & "%"
                    Page.RegisterStartupScript("", " ")
                End If
                If state = 100 Then
                    Me.panelProgress.Visible = False
                    Me.panelBarSide.Visible = False
                    Me.AirReady.Text = "Task Completed!"
                    Page.RegisterStartupScript("", " ")
                End If
            Catch ex As Exception

            End Try

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1