Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Updated 23-May-19 5:47am

Yes, it is possible.
asp.net image overlay[^] will give you a lot of examples.
 
Share this answer
 
Comments
Priya Karthish 23-May-19 8:08am    
I don't know whether you understood my question. The user should be notified when he has a new message. Messages are interlinked with database. I want to know whether it is possible or not. This link doesn't answer my question
phil.o 23-May-19 8:17am    
Your question is: "Is it possible or not?"
My answer is: "Yes, it is possible"
You have to:
- get the number of unread messages
- display an overlay over the icon with number obtained from first step
I do not have any information about your site, database, actual code, etc. I only have the information you provided, and can only provide answers based on this information.
Priya Karthish 23-May-19 8:31am    
Ok thank you. I will start working. If I have any doubt, I ll ask you again.
phil.o 23-May-19 8:39am    
You are welcome to post a new question when you need. Please read How to ask a question[^] to maximize your chances to get an appropriate answer.
If you're working with MS SQL Server, you can use SqlDependency class[^].

MSDN wrote:
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.


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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900