-
问题内容:ajax怎样和.net进行通信啊?
- 原讨论链接:http://community.csdn.net/expert/topicview1.asp?id=5132687
- 所属论坛:Ajax
审核组:WEB开发
- 提问者:duml789
解决者:y7967
- 感谢:acheng7777
- 关键字:Web 开发 下面 教程 net text 交互 stream Ajax 看过 不明不白 system.io.binaryreader
- 答案:
刚看过ajax基础教程,都是和jsp的,看得不明不白的.做web开发,ajax如何和.net进行交互啊?
---------------------------------------------------------------
下面事接受send发送过来得数据,如果用url,则用Request.QueryString
Response.Clear();
System.IO.Stream stream = Request.InputStream;
System.IO.BinaryReader br = new System.IO.BinaryReader(stream, System.Text.Encoding.UTF8);
byte[] b = br.ReadBytes(int.Parse(stream.Length.ToString()));
string text = System.Text.Encoding.UTF8.GetString(b);
//Response.ContentType = "text/xml";
Response.Write(text);
Response.End();
---------------------------------------------------------------
http://www.cnblogs.com/yao/archive/2006/01/13/316629.html
- 评价:
给朵鲜花(111)
扔个鸡蛋(88)