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中页面代码

  • 相关阅读:
    Linux常用命令
    Docker常用命令
    Google操作
    JAVA实现动态二维码输出
    JAVA IDEA Debug设置
    JAVA下载https资源图片
    Nginx配置文件常用操作
    Docker安装(Ubuntu、CentOS)
    SpringBoot启动脚本
    Tomcat——tomcat配置文件方式部署项目
  • 原文地址:https://www.cnblogs.com/qiushuixizhao/p/3305796.html
Copyright © 2011-2022 走看看