CSDN=>FAQ=>FAQ 展示
  • 问题内容: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)
相关FAQ
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo