JQuery - Method equals to c# All()-method -
If I use C #, then to check that any element in the list is equal to propery value of objects , And if it does, do not add it to the list.
c #
public class user {public string user {get}} set; }}
.
Private Static List & lt; Users & gt; UserList = new list & lt; Users & gt; ();
.
string current user = context. the user. Identity; name; If (userList.All (o = & gt; OUUS! = Current user)) {userList.Add (new user {user = current user}); }
JQuery attempt ...
I am trying to add items to a list. If the item is already in the list, then do not add it. This is never added to my poor contempt ...
It's really very easy to use jQuery on each of your users array Iter (user, function) (if ($ (this). User! = Current user name) {$ ($ (user, current user name) '# MonitorMgs'). Append ('
Comments
Post a Comment