02 2019 档案

摘要:Autofac配置 using Autofac; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Web; using System.We 阅读全文
posted @ 2019-02-21 17:00 bxzjzg 阅读(262) 评论(0) 推荐(0) 编辑
摘要:可能有些时候需要记录Action的执行时间来优化系统功能,这时可以用过滤器来实现 第1个例子 using System; using System.Diagnostics; using System.Net.Http; using System.Threading; using System.Thr 阅读全文
posted @ 2019-02-18 17:54 bxzjzg 阅读(273) 评论(0) 推荐(0) 编辑
摘要:引用 Newtonsoft.Json // Post请求 public string PostResponse(string url,string postData,out string statusCode) { string result = string.Empty; //设置Http的正文 阅读全文
posted @ 2019-02-12 15:43 bxzjzg 阅读(4090) 评论(0) 推荐(0) 编辑
摘要:解决办法有两种:第一种:使用对象的字段属性设置JsonProperty来实现(不推荐,因为需要手动的修改每个字段的属性) public class UserInfo { [JsonProperty("id")] public int Id{ set; get; } [JsonProperty("us 阅读全文
posted @ 2019-02-01 09:22 bxzjzg 阅读(541) 评论(0) 推荐(0) 编辑
摘要:Razor 将C#对象转换成Javascript对象 在Razor中使用Json字符串,特殊字符被自动转义(如:\"->&quot;) ViewBag.Data = list; <script type="text/javascript"> //将数据对象转换为 JSON 格式,是为了在网页中通过使 阅读全文
posted @ 2019-02-01 09:10 bxzjzg 阅读(2873) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示