The text of this article is not in this database — only its details are. Read it on the old site: Broadcast Message Using SignalR
4 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Broadcast Message Using SignalR
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Gaurav RajPosted Aug 13, 2018, 5:12 AM
RouteTable.Routes.MapHubs(); maphubs error found missing assembly refererence
Basit KhanPosted Dec 31, 2017, 1:24 AM
Very nice article, but how to send message from code behind instead of using javascript. <script type="text/javascript"> $(function () { // Declare a proxy to reference the hub. var notifications = $.connection.employeeHub; // Create a function that the hub can call to broadcast messages. notifications.client.receiveNotification = function (message) { // alert(" says '" + message + "'"); // Html encode display name and message. var encodedMsg = $('<div />').text(message).html(); // Add the message to the page. $('#discussion').append('<li>' + encodedMsg + '</li>'); }; // Start the connection. $.connection.hub.start().done(function () { $("#button1").click(function () { notifications.server.sendNotifications($("#text1").val()); }).fail(function (e) { alert(e); }); }); }); </script>
Anu VPosted Feb 3, 2017, 6:59 AM
Nice one.. Thanks for sharing..
Santhakumar MunuswamyPosted Apr 25, 2015, 7:32 AM
Good one