开发者

ASP.NET Notifications for changes in database

We have a window application and a web application, and both connect to a same database to handle data. User on web application will do some changes and wait for the approve from users on window application. Is there any way to show a live update or notification on web application whenever an approve is made at window application which is lead to change in database? Note: we use ASP.NET for web application and .NET for开发者_StackOverflow中文版 windows application


This link which talks about SQLDependency and Query Notification seems to be what you are looking for.

You could setup a "notification" area within an updatepanel, or just use straight up ajax to make queries to the database on a specified interval as well.

There are several options.


you can refresh your ASP.NET page by regular interval. http://www.devcurry.com/2009/03/how-to-refresh-aspnet-gridview.html


Refresh a portion of the page periodically using AJAX. I would use jquery for the ajax stuff: jquery.com

Not sure how long the approval process is expected to take, but you could set the page to poll the server every 5 seconds, 15 seconds, whatever makes sense. If it's just refreshing a small portion of the page, it shouldn't be too much of a burden on the server relative to reloading the entire page at every interval.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜