我有一个小的C#代码背后如下15秒后刷新一个WebForm页面(form.aspx):自动刷新页面的倒计时
lblMessage.Text = "<b><h2>Thank you!</h2></b></br>We will be right with you.<br><br><br>(This page will be refreshed automatically after 15 seconds)";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Success!", "setInterval(function(){location.href='/form.aspx';},15000);", true);
眼下的页面将在15后刷新秒。我怎样才能让计时器每秒钟倒计时?即,15 => 14 => 13 => ... 1,那么刷新所以这将是更好地为用户,他们才知道是怎么回事,与网页...
创建页面上的输入或元件,示出了计时器上的每个间隔向下计数。 – Mouser
我认为这会更适合,更容易理解把它放在你的aspx而不是代码背后 – Kritner