Note that there are some explanatory texts on larger screens.

plurals
  1. POSimple example of signalR not working
    primarykey
    data
    text
    <p>Not able to get SignalR working in my machine (with IE9). On entering some text and clicking submit, the text is not getting listed as intended. Also, I would expect the list getting updated from multiple instances of browser and It does not happen. There is no error. Could anybody help here?</p> <h2>C#</h2> <pre><code>namespace TestSignalR.Hubs { using System; using System.Collections.Generic; using System.Linq; using System.Web; /// &lt;summary&gt; /// Summary description for ChatHub. /// &lt;/summary&gt; public class ChatHub : SignalR.Hubs.Hub { public void TestMessage(string message) { Clients.writeMessage(message); } } } </code></pre> <h2>ASPX</h2> <p> </p> <pre><code>&lt;input type="text" name="txtInput" id="txtInput" /&gt; &lt;button id="btnSubmit"&gt;Submit&lt;/button&gt; &lt;ul id="messages"&gt; &lt;/ul&gt; &lt;script type="text/javascript" src="SignalR/Hubs"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function (message) { var chat = $.connection.chatHub; chat.writeMessage = function (message) { $("#messages").append("&lt;li&gt;" + message + "&lt;/li&gt;"); }; $("#btnSubmit").click(function () { var text = $("#txtInput").val(); chat.testMessage(text); }); $.connection.hub.start(); }); &lt;/script&gt; </code></pre> <p></p> <p>Master page has the references for the JQuery and SignalR files:-</p> <pre><code>&lt;script src="Scripts/jquery-1.6.4.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="Scripts/jquery.signalR-0.5.2.min.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload