摘要: 1、在方法参数前加上JsonRead的泛型特性 public ActionResult GetData([JsonRead(typeof(PostData))]PostData postData)2、继承CustomModelBinder类:public class JsonReadAttribute : CustomModelBinderAttribute { private Type type; public JsonReadAttribute(Type type) { this.type = type; ... 阅读全文
posted @ 2014-03-19 18:26 瓜王 阅读(2429) 评论(0) 推荐(0)