long total = task.TotalFileSize;
long now = task.DowloadedFileSize;
if (total > 0)
{
Percent.Text = ((int)((((float)now / (float)total)) * 100)).ToString() + " %";
}
long now = task.DowloadedFileSize;
if (total > 0)
{
Percent.Text = ((int)((((float)now / (float)total)) * 100)).ToString() + " %";
}
ASP.NET中实现确定按钮:
this.TerminateUpdate.Attributes["onclick"]="javascript:return confirm('确定要中止该任务吗?');";