Click here to Skip to main content
15,913,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey guys, I've done a lot of searching on the internet to find an example of a non MVC application which implements SingalR with no luck.
Ok a brief overview of what I am after.
I want to use SingalR to present the user with a popup message when a task has completed, I have a table in the database called notification which has a statusId column, I want Singalr to present a popup when this status is set to a certain value. Displaying the popup is not the problem its using SingalR to know when this value is reached in the database.
Any ideas on how to achieve this or is it even possible?
I'm using Sql Server thanks in advance guys.
Posted

1 solution

I haven't played around all that much with SignalR and the little that I did use it was mostly focused on Hubs. From what I saw, calling a client function from the hub results in that function being auto-generated into jQuery that's referenced by the client.

The auto-generated functions that are created act a lot like events we use in any WinForms or WPF based application. By this, I mean, that the client has an event handler (i.e. your pop-up code) that they register to an event. Once you raise the event (call the client function from the hub/server), you client's event handler will be called.

It sounds like you need a method on the server side that calls the correct client(s) at the correct time.
 
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