带通知消息的图标。 [英] Icon with notification message.

查看:122
本文介绍了带通知消息的图标。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Webapplication项目(asp.net /vb.net)。现在在我的主页面上,我将有一个Icon。如果有任何消息,Icon应该通知。消息从数据库(sql)中提取。

是否可以显示我是否收到任何消息以及消息的数量。

我读了很多关于通知的信息。但没有任何与数据库有关。



我尝试过:



I am working in a Webapplication project(asp.net /vb.net). Now in my Main Page, I will be having an Icon. The Icon should notify that if there is any message. Messages are extracted from database(sql).
Is it possible to show whether I received any message and also how many messages.
I read a lot regarding Notification. But nothing is related with database.

What I have tried:

Just I need the answer whether it is possible or Not?

推荐答案

是的,这是可能的。

asp.net图像叠加层 [ ^ ]会为您提供大量示例。
Yes, it is possible.
asp.net image overlay[^] will give you a lot of examples.


如果您正在使用MS SQL Server,则可以使用 SqlDependency类 [ ^ ]。



If you're working with MS SQL Server, you can use SqlDependency class[^].

MSDN写道:

SqlDependency对象表示之间的查询通知依赖关系一个应用程序和一个SQL Server实例。应用程序可以创建一个SqlDependency对象并注册以通过OnChangeEventHandler事件处理程序接收通知。

The SqlDependency object represents a query notification dependency between an application and an instance of SQL Server. An application can create a SqlDependency object and register to receive notifications via the OnChangeEventHandler event handler.





对于PostgreSql,请检查: PostgreSQL通知示例 [ ^ ]



有关详细信息,请参阅:

使用SqlDependency进行数据更改事件 [ ^ ]

使用SqlDependency和SqlCacheDependency查询通知 [ ^ ]



For PostgreSql, check this: A PostgreSQL Notification Example[^]

For further details, please see:
Using SqlDependency for data change events[^]
Query Notification using SqlDependency and SqlCacheDependency[^]


这篇关于带通知消息的图标。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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