public void getAllSelectedBrands(string phone, string clientID) { try { string json1 = ""; MySQLBusinessLogic bl = new MySQLBusinessLogic(); List<string> lstSelected = new List<string>(); int storeID = GetStoreIDbyPhone(phone); lstSelected = bl.GetBrandsbyStoreID(storeID); //var jsonSerialiser = new JavaScriptSerializer(); //json1 = jsonSerialiser.Serialize(lstSelected); var str = String.Join(",", lstSelected); Clients.Client(clientID).gotAllSelectedBrands(str); } catch (Exception ex) { } }