用了AJAX之后,timer定时10秒,然后页面就每十秒都执行一次page的事件
怎么搞的那,有些代码我想就执行一次的啊,这下怎么办那,不管是page的init 还是page的load都会每十秒执行一次的啊
程序代码:<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
//这里是要刷新的数据显示的地方。
<asp:Timer ID="Timer1" runat="server" Enabled="True" Interval="10000" ontick="Timer1_Tick">
</asp:Timer>
</ContentTemplate>
</asp:UpdatePanel>protected void Timer1_Tick(object sender, EventArgs e)
{
QueryData(); //自己写的一个显示部分数据的方法。
}