Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 26-Apr-13 8:32am
frostcox2.3K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 375
1 Sergey Alexandrovich Kryukov 329
2 CPallini 260
3 DamithSL 214
4 Maciej Los 197
0 OriginalGriff 5,455
1 DamithSL 4,457
2 Maciej Los 3,885
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,115


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100