private void button2_Click(object sender, EventArgs e) { string url = "http://localhost:9002/index.php/Inventory/Demo/demo2"; jsonClass jc = new jsonClass("wei", "24"); string jsonString = string.Empty; jsonString = fastJSON.JSON.Instance.ToJSON(jc); HttpWebConnect helper = new HttpWebConnect(); helper.RequestCompleted += new deleGetRequestObject(helper_RequestCompleted_getAllOrders); helper.TryPostData(url, jsonString); }
void helper_RequestCompleted_getAllOrders(object o) { string strProduct = (string)o; object olist = fastJSON.JSON.Instance.ToObject(strProduct, typeof(jsonClass)); jsonClass jc = (jsonClass)olist; }