码迷,mamicode.com
首页 > Web开发 > 详细

.getjson回调函数

时间:2017-07-23 12:35:55      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:orm   exp   convert   ring   for   response   函数   llb   定义   

res是定义的json类

//回调函数
string strJson = JsonConvert.SerializeObject(res);
string callback = Request.QueryString["jsoncallback"];
string data = strJson;
string result = string.Format("{0}({1})", callback, data);
Response.Expires = -1;
Response.Clear();
Response.ContentEncoding = Encoding.UTF8;
Response.ContentType = "application/json";
Response.Write(result);
Response.Flush();
Response.End();

.getjson回调函数

标签:orm   exp   convert   ring   for   response   函数   llb   定义   

原文地址:http://www.cnblogs.com/pp521/p/7224140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!