ContentType是否大小写区分?
2015-10-17 19:40
435 查看
ContentType控制web类型输出。无论是大小写是否区分?
例如:
是否同样呢?
本来执行全然没有问题的代码。前台代码:
后台代码:
当我把后台代码改动成
时,前台直接报错了。!是这一句。!
没有IsSuccess属性!
!!
终于查出来的原因居然是一个大写和小写的问题导致的!!
看来ContentType它是大小写区分。但我没有找到相关信息!!
例如:
context.Response.ContentType = "application/json";
context.Response.ContentType = "application/Json";
是否同样呢?
本来执行全然没有问题的代码。前台代码:
$.ajax({ type: "post", url: urlAjax + "?OperationType=add", data: $(formId).serialize(), success: function (msg) { var obj = jQuery.parseJSON(msg); if (obj.IsSuccess == true) { $.messager.alert('提示', obj.Msg,'info',SaveOkCallback); } else { $.messager.alert('提示', obj.Msg); } EnableButton(true); } });
后台代码:
context.Response.ContentType = "application/Json";
当我把后台代码改动成
context.Response.ContentType = "application/json";
时,前台直接报错了。!是这一句。!
jQuery.parseJSON(msg)
没有IsSuccess属性!
!!
终于查出来的原因居然是一个大写和小写的问题导致的!!
看来ContentType它是大小写区分。但我没有找到相关信息!!
相关文章推荐
- 静态链接库和动态链接库概念
- 二、如何在 HTML 文档中放置VBScript
- jquery属性值选择器
- 生活杂事
- FileStream实现多媒体文件复制
- LeetCode 073 Set Matrix Zeroes
- 宏定义的黑魔法 - 宏菜鸟起飞手册
- 状态模式的具体实现 情景一
- storm 开发系列二 Clojue版本
- TOK算法
- 在arcgis使用python脚本进行字段计算时对中文的处理方案
- 基于android混合开发的JsBridge技术学习
- QTP11.5发布,改名UFT
- 基于android混合开发的JsBridge技术学习
- 用静态字段和构造函数,查询创建了多少个对象
- <LeetCode><Easy> 70 Climbing Stairs #斐波那契数列
- 对centos6下时间同步(ntp)操作的讨论
- Spark standalone模式安装
- 聚集索引与非聚集索引的区别
- 从finally看class编译字节码