[問題] ASP.NET 關於content page的update panel
爬了一些文發現...
已在master page使用scriptmanager的情況下,
在content page中可不必再加入scriptmanager,
但因為我在content page中想放一個update panel的區域,
打算用timer來做內容的更新,發現怎麼試都不會有變化??
不知是哪裡有錯!?
首先在content page內插入一段
<asp:updatepanel ....>
<contentTemplate>
<asp:Label ......></asp:Label>
</contentTemplate>
<Triggers>
<asp:AsyncPostBakTrigger: ControlID="Timer1" EventName="tick" />
</Triggers>
</asp:updatepanel>
c#程式碼
protected void Timer1_Tick(object sender, EventArgs e)
{
this.Label1.Text = DateTime.Now.LongTimeString();
}
想要在content page中看到時間的變化,但始終不變? 可否請各位大大指點迷津..謝謝!!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.136.144.60
※ 文章網址: http://www.ptt.cc/bbs/Web_Design/M.1412899758.A.389.html
→
10/10 08:24, , 1F
10/10 08:24, 1F
推
10/10 12:38, , 2F
10/10 12:38, 2F
→
10/10 21:08, , 3F
10/10 21:08, 3F
→
10/10 21:09, , 4F
10/10 21:09, 4F
推
10/10 21:53, , 5F
10/10 21:53, 5F
推
10/11 02:06, , 6F
10/11 02:06, 6F
→
10/11 17:50, , 7F
10/11 17:50, 7F
→
10/11 17:50, , 8F
10/11 17:50, 8F