title: show the list of usernames inside a div
body: <p>I am new to jQuery. In my project, I created one Class <code>User</code> in which the code is as shown below:</p>
  
  <pre><code> static ConcurrentDictionary&lt;string, User&gt; _users = new ConcurrentDictionary&lt;string, User&gt;();
   //
   //  some function to add values to _users list
   //
   public List&lt;User&gt; GetConnectedUsers()
   {
        return _users.Values.ToList();
   }
  </code></pre>
  
  <p>I want to show this list of values in <code>div</code> #showUsernames. How to do this by using jQuery?</p>
  
  <p>I tried the below which is not showing anything</p>
  
  <pre><code>    /*display your contacts*/
      $('#showUsernames').append(function(){
          chat.server.getConnectedUsers();
      });
  </code></pre>
  
  <p>where <code>chat.server</code>(signalr) calls the server-side code(Chat class)..
  <br>I think the solution has nothing to do with signalr.</p>
  
  <p>If the above description is not enough then you can go through my code <strong><a href="https://github.com/venkateshwar/SignalR-Chat-application/blob/master/file.js" rel="nofollow">here</a></strong></p>
  
  <p>EDIT:  <strong>User.cs</strong></p>
  
  <pre><code>public class User
  {
      public User(string ConnID, string Username)
      {
          Name = Username;
          ConnectionID = ConnID;
      }
      public string Name { get; set; }
      public string ConnectionID { get; set; }
  }
  </code></pre>