title: SignalR- send data to a specific client
body: <p>I want to send data to a specific client. to do that I am trying with the following;</p>
  
  <pre><code>public Task GetWaitingOrdersCount(string id, string clientId)
      {
          DateTime today = Util.getCurrentDateTime();
  
        var data = 10
  
        return Clients.Client(Context.ConnectionId).loadOrders(data);
  
        //return data;
      }
  </code></pre>
  
  <p>In the above code, I want to send 'data' to the 'clientId' passed to this method.
  BUT I m having an error in this line</p>
  
  <pre><code> return Clients.Client(Context.ConnectionId).loadOrders(data);
  </code></pre>
  
  <p>And the error is</p>
  
  <pre><code>'System.Threading.Tasks.Task&lt;object&gt;' does not contain a definition for 'loadOrders'
  </code></pre>
  
  <p>the client side code</p>
  
  <pre><code>con.loadOrders = function (data) {
          loadOrders(data);
  
      };
  
  function loadOrders(data) {
  
      $('#totalOrders').html(data);
  }
  </code></pre>
  
  <p>Any help about the error???</p>
  
  <p><strong>EDIT:</strong>
  This is my full client code..</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var con;
  $(document).ready(function () {
      con = $.connection.messagingHub;
  
  
      $.connection.hub.start(function () {
          var myClientId = $.connection.hub.id;
          con.getWaitingOrdersCount('&lt;%:ViewBag.rid%&gt;',myClientId).done(function (data) {
              console.log(data);
          });
      });
  
      con.client.loadOrders = function (data) {
          loadOrders(data);
  
      };
  
  });
  function loadOrders(data) {
  
      $('#totalOrders').html(data);
  </code></pre>
  
  <p></p>