zoukankan      html  css  js  c++  java
  • ASP.NET 学习笔记 一

    在管道调用的时候,有几个非常重要的内置对象:Request   Resposne  Session  Cookie  Application  Server

    一 :Requset : 请求      服务器接收客户端数据的(Get,Post)

            Request.QueryString  查询字符串               Get请求!

            Request.Form   请求表单   Post请求!   

            Request.Files   Post 请求文件(文件上传)    传文件时,需要将 enctype = "multipart/form-data"

            Request.MapPath()      将虚拟路径转换成物理路径

            Recquest.Header      请求头

           Recquest.Cookies[].Value

        

    二 :Response: 响应    服务器给客户端数据的

            Response.Write()    向客户端输出内容

           Response.Redirect()  重定向

    三:Session:会话     所有人,自己的存储空间    数据保存在服务器中(存在内存中,效率低,并发低),目前存储少量重要数据,比如账号(用于身份验证)

           Session["*****"] = "*****"

           Session 是一个键值对,存活时间20min 

           Session 销毁  Abandon/Clear

    四:Cookie:客户端数据

            时效性 

            Response.Cookies.Add(New HttpCookie("token")){value = "abc136121",expires = datetime.Now.AddDays(7)}

            清除cookie的特定值,使用过期的方式

            Response.Cookies.Add(New HttpCookie("token"){Expires = DateTime.Now.AddDays(-1)})  

    五: Application: 当前网站对象

            HttpContext,Application["    "] = "     " 

    六: Server: 服务器对象

            Server.Transfer (path:"        ")    转发       路径不变,内容发生变化(当前网站内部)

            Server.MapPath()     虚拟路径转绝对路径

            Server.HtmlEncode()

       Server.HtmlDecode()

       Server.UrlEncode()

       Server.UrlDecode() 

  • 相关阅读:
    Powershell数据处理
    Powershell About Active Directory Group Membership of a domain user
    Powershell About Active Directory Server
    Oracle Schema Objects——Tables——TableStorage
    Oracle Schema Objects——Tables——TableType
    English Grammar
    Oracle Database Documentation
    Oracle Schema Objects——Tables——Oracle Data Types
    Oracle Schema Objects——Tables——Overview of Tables
    What is Grammar?
  • 原文地址:https://www.cnblogs.com/Bull-Rush/p/12830096.html
Copyright © 2011-2022 走看看