• Request的RawUrl属性,和其它获取url信息的各种方法比较


    以下转自http://hi.baidu.com/anyedage/blog/item/e8c45ed3b90d25023af3cf26.html

    Request.ApplicationPath: /testweb

    Request.CurrentExecutionFilePath: /testweb/default.aspx

    Request.FilePath: /testweb/default.aspx

    Request.Path: /testweb/default.aspx

    Request.PathInfo:

    Request.PhysicalApplicationPath: E:\WWW\testweb\

    Request.PhysicalPath: E:\WWW\testweb\default.aspx

    Request.RawUrl: /testweb/default.aspx?id=1

    Request.Url.AbsolutePath: /testweb/default.aspx

    Request.Url.AbsoluteUri: http://www.test.com/testweb/default.aspx?id=1

    Request.Url.Host: www.test.com

    Request.Url.LocalPath: /testweb/default.aspx



                 Response.Write("<b>Request.ApplicationPath:</b> " + Request.ApplicationPath + "<br>");

                 Response.Write("<b>Request.CurrentExecutionFilePath:</b> " + Request.CurrentExecutionFilePath + "<br>");

                 Response.Write("<b>Request.FilePath:</b> " + Request.FilePath + "<br>");

                 Response.Write("<b>Request.Path:</b> " + Request.Path + "<br>");

                 Response.Write("<b>Request.PathInfo:</b> " + Request.PathInfo + "<br>");

                 Response.Write("<b>Request.PhysicalApplicationPath:</b> " + Request.PhysicalApplicationPath + "<br>");

                 Response.Write("<b>Request.PhysicalPath:</b> " + Request.PhysicalPath + "<br>");

                 Response.Write("<b>Request.RawUrl:</b> " + Request.RawUrl + "<br>");

                 Response.Write("<b>Request.Url.AbsolutePath:</b> " + Request.Url.AbsolutePath + "<br>");

                 Response.Write("<b>Request.Url.AbsoluteUri:</b> " + Request.Url.AbsoluteUri + "<br>");

                 Response.Write("<b>Request.Url.Host:</b> " + Request.Url.Host + "<br>");

                 Response.Write("<b>Request.Url.LocalPath:</b> " + Request.Url.LocalPath + "<br>");

    乌龟才背着房子过一辈子
  • 相关阅读:
    226. 翻转二叉树
    LeetCode 1660.纠正二叉树(Medium)
    814. 二叉树剪枝
    110. 平衡二叉树
    HTTPS原理浅析
    MySQL知识网络
    制作SSL证书(签发免费证书)
    Redis高可用三(Redis Cluster集群)
    Redis高可用二( 哨兵sentinel)
    Redis高可用一(主从)
  • 原文地址:https://www.cnblogs.com/Yellowshorts/p/2955346.html
Copyright © 2020-2023  润新知