UpdatePanle问题中的Asp.net计时器 [英] Asp.net Timer in UpdatePanle Problem

查看:97
本文介绍了UpdatePanle问题中的Asp.net计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在asp页面中使用ajax计时器来显示数字时钟.

我的方法是在timer_tick事件中

我写了

I am using ajax timer in asp page to show digital clock.

The way i did is,on the timer_tick event

i wrote

protected void Timer1_Tick(object sender, EventArgs e)
   {
       lblcurrenttime.Text = DateTime.Now.ToShortTimeString();
   }



这样在每一个刻度上,我就会得到当前时间,这对我来说很好,

然后将这个计时器和lblcurrenttime LABEL控件放在UpdatePanel中.

我在同一页面上还有1个更新面板.它包含两个文本框,列表框等...

在运行时,当我将值放入第二个更新面板中的文本框时,每秒就会清除该探针,我认为它与该计时器密切相关.....




请帮助我避免使用相同的



so that on each tick,i am getting current time,the way is fine for me,

and i put this timer and lblcurrenttime LABEL control in an UpdatePanel.

i have 1 more Update Panel in the same page.and it contains two textboxes,list boxes etc...

the probelm is,on runtime,when i putting values to the textboxes in the second updatepanel,on each second,it becomes cleared,i think its closely related to that timer.....




Please help me to avoid the same

推荐答案

您用于更新面板的UpdateMode是什么?
记住将UpdatePanel的UpdateMode设置为Conditional.

Google [
What UpdateMode you use for update panel?
Remember to set UpdatePanel''s UpdateMode to Conditional.

Google [^] for more details.


这篇关于UpdatePanle问题中的Asp.net计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆