手动模拟输出json

每次去写太麻烦,写一个样本,下次对照就好了

            context.Response.Write
("{\"UserName\":\""+HttpContext.Current.User.Identity.Name+"\","+"\"SessionID\":\""+context.Request.Cookies["ASP.NET_SessionId"].Value+"\"}");//输出模拟json对象

 

posted @ 2014-04-23 10:15  KyrieYang  阅读(178)  评论(0编辑  收藏  举报