You shouldn't use any server side controls (runat="server") in an ASP.NET MVC application because that they rely on ViewState and PostBack which are notions that no longer exist in ASP.NET MVC. The only exception makes <asp:Content> panels used by the webforms view engine to implement master pages. Also there is no notion of binding.
In ASP.NET MVC you have a model, a controller and a view. The controller populates some model and passes it to the view to be shown. The view itself could use HTML helpers to generate simple markup or include other partial views for more complex scenarios.
So you start with defining a model:
public class MyViewModel
{
public double Progress { get; set; }
}
then you have a controller which will manipulate this view model:
public class HomeController: Controller
{
public ActionResult Index()
{
var completed = 5; // get this from somewhere
var total = 10; // get this from somewhere
var model = new MyViewModel
{
Progress = (1.0 * completed / total)
}
return View(model);
}
}
and finally you would have a strongly typed view to this model where you would show the markup:
<%@ Page
Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<AppName.Models.MyViewModel>"
%>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Progress</h2>
<div><%= Html.DisplayFor(x = x.Progress)</div>
</asp:Content>