zoukankan      html  css  js  c++  java
  • ASP.NET中的Response

    Response.BufferOutput=true、false  是否设置缓存

    Response.Write("")   输出字符串

    Response.IsClientConnected=true/false客户端当前是否在连接

    Response.Redirect(""url)   实现页面跳转

    Response.End(); 停止页面的的执行

    Response.WriteFile(Server.MapPath(@"TextFile.txt"));指定的文件直接写入到http输出流

    ----------------------------------------------------------------------------------------------

    Request对象

    1.Browser属性

    Request.Browser.Platform浏览器使用的平台

    Request.Browser.Version浏览器使用的版本

    Request.Browser.Type浏览器使用的类型

    2.QueryString属性  获取http查询字符串变量的集合

    3.NameValueCollection包含有客户端发送的查询字符串变量的集合

    Request的方法

    1.MapPath(string path) 把当前请求的URL中的虚拟路径映射到服务器上的物理路径

    string str=Request.MapPath("default.aspx"); 得到 default.aspx的物理路径

    2.SaveAs(string filename,bool false/true)   讲http请求保存到磁盘上

     Request.SaveAs(Server.MapPath("default.txt"),true);  http请求保存到文本文件中,http头保存到磁盘

    Redirect.aspx中页面代码

  • 相关阅读:
    spingboot集成jpa(二)
    datanode与namenode的通信
    Yarn NodeManager restart
    hadoop上线和下线节点
    Spark读取文件
    eclipse安装中文补丁包
    eclipse中maven打包
    (转) eclipse安装lombok
    Windows 访问 Oracle
    wCF 问题收集页
  • 原文地址:https://www.cnblogs.com/qiushuixizhao/p/3305796.html
Copyright © 2011-2022 走看看