更新面板和数据列表 [英] update panel and datalist

查看:105
本文介绍了更新面板和数据列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我需要一个div标签,该标签可从数据库中定期更新图书,我如何才能使用AJAX的更新面板,并在DATALIST控件下使用允许用户查看特定图书的查看按钮....

另外我该如何在使用它的数据列表中添加图像控件;从数据库中提取数据...

我怎么才能实现这些目标呢?:)

hi!! i need a div tag which updates books from a database reguraly how can i achive this can i use update panel of AJAX and under that the DATALIST control where i have a view button which enables users to view the particular book....

also how can i add image control in datalist which uses it;s dource from database...

how can i achive these thing''s... :)

推荐答案

您可以像在DataList中添加其他控件一样添加图像控件.你有什么问题?

要刷新UpdatePanel,您需要以某种方式触发它.在UpdatePanel内或外部添加一个隐藏按钮(并为UpdatePanel设置触发器).使用JavaScript(如setInterval)自动单击按钮.

You add the image control just like any other control in your DataList. What is the problem you are having?

To refresh the UpdatePanel you need to trigger it in some way. Add a hidden button, either within the UpdatePanel or outside (and set the Triggers for the UpdatePanel). Use JavaScript, like setInterval, to automatically click the button.

window.setInterval(refresh, 500);
function refresh()
{


(" ). (); }
("#refresh button id").click(); }


这篇关于更新面板和数据列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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