日期:2014-05-16 浏览次数:20508 次
准备工作
·Customer类
?
?
public class Customer
{
??? public int Unid { get; set; }
??? public string CustomerName { get; set; }
??? public string Memo { get; set; }
??? public string Other { get; set; }
}
?
?
·服务端处理(Json_1.ashx)
?
?
Customer customer = new Customer
????? { Unid=1,CustomerName="宋江",Memo="天魁星",Other="黑三郎"};
string strJson = Newtonsoft.Json.JsonConvert.SerializeObject(customer);
?
context.Response.Write(strJson);
?
?
(一)Jquery. getJSON