百分贴!高手帮看看啊,这个简单的Timer怎么就是不行啊?
我照网上的例子做的代码如下,可是Timer里的事件好像根本没发生啊,结果就是在UpdatePanel 里的LabelIn 内容不发生改变
为什么啊?俺郁闷的看了n遍,也没看出哪错了,帮俺看看吧。这个问题不解决,俺就麻烦大了,究竟错哪儿了?
例子的原型是在http://www.cnblogs.com/Terrylee/archive/2006/11/14/Introduction_to_the_Timer_Control.html 里
下面是我的代码
<%@ Page Language= "VB " AutoEventWireup= "false " CodeFile= "Temp.aspx.vb " Inherits= "Temp " %>
<%@ Register Assembly= "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 "
Namespace= "System.Web.UI " TagPrefix= "asp " %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml " >
<head runat= "server ">
<title> 无标题页 </title>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<asp:ScriptManager ID= "ScriptManager1 " EnablePartialRendering= "true " runat= "server ">
</asp:ScriptManager>
<asp:UpdatePanel ID= "UpdatePanel1 " runat= "server ">
<ContentTemplate>
<asp:Timer ID= "Timer1 " runat= "server " Interval= "10000 " OnTick= "Timer1_Tick ">
</asp:Timer>
<asp:Label ID= "LabelIn " runat= "server " Text= "Label Display "> </asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID= "Timer1 " />
</Triggers>
</asp:UpdatePanel>
</div>
<asp:Label ID= "LabelOut " runat= "server " Text= "Label "> </asp:Label>
</f