如何更新网站中的单个面板 [英] How to update a single panel in website

查看:77
本文介绍了如何更新网站中的单个面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想更新标签而无需重新加载页面.我正在使用带有一定时间间隔的线程来调用函数.我使用了更新面板.我没有使用任何按钮单击.只是递归地调用该函数.当我检查使用断点时,值正在更改.但它不会在网页中更新.有什么方法可以做到.

Hi,
I want to update the labels without reload a page. I am calling function using thread with some time interval. I used update panel. I am not using any button click. Just calling the function recursively. The values are changing when i check that using break point. But its not updating in webpage. Is there any way to do this.

推荐答案

设置JavaScript事件.
或页面加载事件或设置焦点事件.
Set JavaScript Event.
Or Page load event or set focus event .


如果要调用某个函数以一定的间隔时间更新updatepanel中的标签,则应该使用Timer控件.
将计时器控件放在updatepanel内.给该计时器指定一些时间间隔,并在Timer.Tick事件权限代码下指定用于更新标签或调用该函数的时间.
If you want call a function for updating labels inside an updatepanel with some regular interval time then you should go for taking the help of Timer control.
Place a timer control inside updatepanel. Give some interval time for that timer and under Timer.Tick event right code for updating that labels or call that function.


如果使用的是更新面板,请确保标签在update内部控制板.更新面板仅更新放置在更新面板中的那些控件.因此,请尝试将标签放在更新面板中并进行检查.会的.


祝一切顺利.
--Amit
If you are using update panel then make sure that your labels are inside update panel. Update panel updates only those controls which is placed inside update panel. So try to put the labels inside your update panel and check it. It''ll work.


All the best.
--Amit


这篇关于如何更新网站中的单个面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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