title: Signal R library for chat is not working for group with mvc asp.net
body: <p>I am using SignalR jQuery library for sending chat with group but I can not see chat can sent in my case here is code...</p>
  
  <p>I have made class for group and passed group from jQuery but seems some thing wrong, I can not see chat can be sent with chat window any one help me ...</p>
  
  <p>Class:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using System.Web;
  using Microsoft.AspNet.SignalR;
  using Microsoft.AspNet.SignalR.Hubs;
  
  namespace Chat.Hubs
  {
      [HubName("myChatHub")]
      public class ChatHub : Hub
      {
          public void Send(MyMessage message)
          {
              // Call the addMessage method on all clients            
              //Clients.All.addNewMessageToPage(message.Msg);
              Clients.Group(message.GroupName).addNewMessageToPage("Group Message " + message.Msg);
          }
  
          //server
          public void Join(string groupName)
          {
              Groups.Add(Context.ConnectionId, groupName);
          }
      }
      public class MyMessage
      {
          public string Msg { get; set; }
          public string GroupName { get; set; }
      }
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>@{
      ViewBag.Title = "Chat";
  }
  
  &lt;h2&gt;Chat&lt;/h2&gt;
  
  &lt;div class="container"&gt;
      &lt;input type="text" id="message" /&gt;
      &lt;input type="button" id="sendmessage" value="Send" /&gt;
      &lt;input type="hidden" id="displayname" /&gt;
      &lt;ul id="discussion"&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  @section scripts {
      &lt;!--Script references. --&gt;
      &lt;!--The jQuery library is required and is referenced by default in _Layout.cshtml. --&gt;
      &lt;!--Reference the SignalR library. --&gt;
      &lt;script src="@Url.Content("~/Scripts/jquery.signalR-1.1.3.min.js")"&gt;&lt;/script&gt;
      &lt;!--Reference the autogenerated SignalR hub script. --&gt;
      &lt;script src="~/signalr/hubs"&gt;&lt;/script&gt;
      &lt;!--SignalR script to update the chat page and send messages.--&gt; 
      &lt;script&gt;
          $(function () {
              // Reference the auto-generated proxy for the hub.  
              var chat = $.connection.myChatHub;
  
  
  
              // Create a function that the hub can call back to display messages.
              chat.client.addNewMessageToPage = function (message) {
                  // Add the message to the page. 
                  $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + htmlEncode(message) + '&lt;/li&gt;');
              };
              // Get the user name and store it to prepend to messages.
              $('#displayname').val(prompt('Enter your name:', ''));
              // Set initial focus to message input box.  
              $('#message').focus();
              // Start the connection.
              $.connection.hub.start(function () {
                  chat.server.join("RoomA");
              });
  
              $.connection.hub.start().done(function () {
  
                  $('#sendmessage').click(function () {
                      // Call the Send method on the hub. 
                      chat.server.send({ Msg: $('#message').val(), Group: "RoomA" });
                      //chat.server.send($('#displayname').val(), $('#message').val());
                      // Clear text box and reset focus for next comment. 
                      $('#message').val('').focus();
                  });
              });
          });
          // This optional function html-encodes messages for display in the page.
          function htmlEncode(value) {
              var encodedValue = $('&lt;div /&gt;').text(value).html();
              return encodedValue;
          }
      &lt;/script&gt;
  }
  </code></pre>