2012年9月17日
摘要: //实现json的序列化和反序列化 Person Person = new Person(); Person.Id = 1; Person.Name = "小白"; DataContractJsonSerializer json = new DataContractJsonSerializer(Person.GetType()); string szJson = ""; //序列化 using (MemoryStream stream = new MemoryStream()) { jso... 阅读全文
posted @ 2012-09-17 10:32 jameshappy 阅读(408) 评论(0) 推荐(0) 编辑
摘要: //实现http访问 try { string getpage = @"http://192.168.0.36:8082/News/PlusNews.aspx"; CookieContainer cc = new CookieContainer(); string content = string.Empty; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(getpage); request.Method = "post"; ... 阅读全文
posted @ 2012-09-17 10:30 jameshappy 阅读(294) 评论(0) 推荐(0) 编辑