问题描述:
http://bbs.csdn.net/topics/390431247
把 ashx 中的context.Response.ContentType = "text/plain";
这句注释掉就ok 了
至于为什么也不太清楚
看的是传智博客中的视频,视频中完全可以运行
但是到了 本人这里却要注释
补充:后来收了些东西 才明白
contentType 是设置服务器像浏览器发出的响应报文的属性浏览器根据吃属性的内容,使用不同的方式来处理【相应报文体】
不同的ContentType 会影响客户端所看到的效果.默认的ContentType为 text/html 也就是网页格式.
代码如:
<% response.ContentType ="text/html" %>
<!--#i nclude virtual="/ContentType.html" -->
<!--#i nclude virtual="/ContentType.html" -->
显示的为网页,而
<% response.ContentType ="text/plain" %>
<!--#i nclude virtual="/sscript/ContentType.html" -->
<!--#i nclude virtual="/sscript/ContentType.html" -->
则会显示html原代码.
更多contentType
http://www.cnblogs.com/chenghm2003/archive/2008/10/19/1314703.html