日期:2014-05-18 浏览次数:20637 次
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "setTimeout(function(){location.href='prodetail.aspx?proid=" + proid + "';},3*1000)", true);
------解决方案--------------------
用Timer控件,参考示例,动态显示时间:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>
</form>
------解决方案--------------------
你根据自己的需要改下。