private void StockRecieve() { string directsupplier = Request["directsupplier"]; int kioskid = Convert.ToInt32(Request["kioskid"]); var collection = Stocks.GetStocksByReferenceAndKioskID(directsupplier, kioskid); JsonBridge <Stocks> jsonFeed = new JsonBridge <Stocks>(); jsonFeed.Valid = collection.Count != 0 ? 1 : 0; jsonFeed.collection = collection; // string output = JsonConvert.SerializeObject(jsonFeed); Response.Write(output); }