[英]Best way to get a label to change text/ redirect page after delay
我正在嘗試在asp.net(c#)中實現以下流程:
我一直在嘗試在C#中做一些事情,但是我開始認為在javascript中實現它更容易
任何幫助/建議將不勝感激。
這樣嘗試
<script type="text/javascript"> function callthis() { setTimeout('window.location = "home.aspx"', 3000); } </script>
從服務器端調用此按鈕單擊
如果您使用了更新面板,則可以使用:
ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "callthis();", true);
您可以使用的其他明智
ClientScript.RegisterStartupScript
(GetType(),Guid.NewGuid().ToString(), "callthis();",true);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.