ASP.NET关于倒计时的问题
publicpartialclasstimetable:System.Web.UI.Page{DateTimeNowTime;DateTimeEndTime=Conver...
public partial class timetable : System.Web.UI.Page
{
DateTime NowTime;
DateTime EndTime=Convert.ToDateTime("2015-06-25 19:00:00");
TimeSpan CountdownSpan;
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) { NowTime = DateTime.Now;
CountdownSpan = EndTime - NowTime;
}
Label1.Text = CountdownSpan.ToString();
}
//然而说好的倒计时··· 展开
{
DateTime NowTime;
DateTime EndTime=Convert.ToDateTime("2015-06-25 19:00:00");
TimeSpan CountdownSpan;
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) { NowTime = DateTime.Now;
CountdownSpan = EndTime - NowTime;
}
Label1.Text = CountdownSpan.ToString();
}
//然而说好的倒计时··· 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询