0
A
回答
1
你可以使用一個Timer控制:
<%@ Page Language="C#" %>
<script type="text/C#" runat="server">
protected void Timer_Tick(object sender, EventArgs e)
{
// This method will be called on every 5 seconds
// Read the database value and update the label
LblStatus.Text = DateTime.Now.ToLongTimeString();
}
</script>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form id="Form1" runat="server">
<asp:ScriptManager ID="scm" runat="server" />
<asp:Label ID="LblStatus" runat="server" />
<asp:Timer ID="Timer" runat="server" Interval="5000" OnTick="Timer_Tick" />
</form>
</body>
</html>
相關問題
- 1. 動態更新ASP.Net MVC中的TextArea 3
- 2. 在ASP.NET中動態更改主題而無需在ASP.NET中刷新頁面
- 3. 在C#ASP.NET中動態更改SessionID
- 4. 在asp.net中動態更改css
- 5. 在c#和asp.net中更新動態創建的文本框
- 6. Quartz.Net ASP.NET狀態更新
- 7. 在存儲過程中動態更新
- 8. 在Android中動態更新TextView
- 9. 在javascript中動態更新內容
- 10. 在Android中動態更新txt文件
- 11. 在Oracle中的動態更新查詢
- 12. 動態狀態更新
- 13. ReactJS動態更新狀態
- 14. 動態更新JPA
- 15. 動態更新viewpager
- 16. 動態更新UITableViewCell
- 17. 動態更新UILabel
- 18. 動態SQL更新
- 19. 動態更新uiimages
- 20. 動態更新gridview。
- 21. 動態更新TextView
- 22. 動態更新值?
- 23. 動態更新Jlist
- 24. JTable動態更新
- 25. 動態更新SVG
- 26. 圖動態更新
- 27. 動態DNS更新
- 28. 更新在ASP.NET
- 29. 動態更新QML中的動畫
- 30. 動態更改登錄名稱在asp.net
(我不得不等待幾分鐘的時候,才讓我按一下勾號)已接!謝謝! :) – FreeSnow 2011-04-01 09:43:00