Hi akhter,
Refer below sample.
Database
For this example I have used of Northwind database that you can download using the link given below.
Download Northwind Database
HTML
<div class="theme-light">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div style="text-align: center;">
<div class="dvValue" style="width: 100px; height: 100px; float: left">
<asp:Label ID="lblValue" runat="server" Style="text-align: center" />
</div>
</div>
<asp:Timer ID="timer" runat="server" Interval="1000">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<link id="themecss" rel="stylesheet" type="text/css" href="https://www.shieldui.com/shared/components/latest/css/light/all.min.css" />
<script type="text/javascript" src="https://www.shieldui.com/shared/components/latest/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="https://www.shieldui.com/shared/components/latest/js/shieldui-all.min.js"></script>
<script type="text/javascript">
$(function () {
TimeProgress(".dvValue", $('[id*=lblValue]').html(), '<h3>{0:n1} %</h3>', 100);
});
function TimeProgress(element, val, htmlText, maximum) {
$(element).shieldProgressBar({
min: 0,
max: maximum,
value: val,
layout: "circular",
reversed: true,
layoutOptions: { circular: { width: 10, borderWidth: 1, borderColor: "#f0ad4e", color: "#f0ad4e" } },
text: { enabled: true, template: htmlText }
}).swidget();
}
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
TimeProgress(".dvValue", $('[id*=lblValue]').html(), '<h3>{0:n1} %</h3>', 100);
}
});
};
</script>
Namespaces
using System.Data.SqlClient;
using System.Configuration;
Code
public static int Value { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
string constring = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constring))
{
using (SqlCommand cmd = new SqlCommand("SELECT TOP 1 Freight FROM Orders WHERE OrderID = 10250", con))
{
con.Open();
lblValue.Text = (Convert.ToInt32(cmd.ExecuteScalar()) - Value).ToString();
Value++;
con.Close();
}
}
}
Screenshot