如果数据库中有更改,则自动更新Listview [英] Automatic Update on Listview if there is changes in DATABASE

查看:73
本文介绍了如果数据库中有更改,则自动更新Listview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C#编写的应用程序,我的后端是MS SQL SERVER,如果我的数据库上有更改,我希望它自动显示在列表视图中,我该怎么做?

i have an application written on C# and my back end is MS SQL SERVER and if there is changes on my DATABASE i want it automatically display in my listview how do i do that?

推荐答案

由于网站的无状态性质,如果不强制页面进行重新加载(例如用户重新访问该网站或选择页面上的某些内容),则很难自动"进行更改例如重新发布数据的按钮.尽管此解决方案需要定期刷新页面,但您可以签出以下解决方案: http://www.knowdotnet.com /articles/asppagerefresh.html [ ^ ]
Due to the stateless nature of websites, it would be difficult to have changes "automatically" occur without something forcing the page to do a reload such as a user re-visiting the site or choosing something on the page such as a button to re-post data. You could check out the following solution although this solution requires a full refresh of the page periodically: http://www.knowdotnet.com/articles/asppagerefresh.html[^]


这篇关于如果数据库中有更改,则自动更新Listview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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