using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class percent_completed : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { int no_lines = int.Parse(TextBox1.Text); int total = int.Parse(TextBox2.Text); float cal = (no_lines/total)*100; int a = Convert.ToInt32(cal); ProgressBar1.Value = a; } }