zoukankan      html  css  js  c++  java
  • asp.net 取得URL信息

    AbsolutePath = "/ReportManage/ReportWindow.aspx"

    AbsoluteUri = "http://localhost:18725/ReportManage/ReportWindow.aspx?action=PickGoodsInfo&keyid=4ffeb15b-c269-451a-95a0-1eb22cbefd18"

    Authority = "localhost:18725"

    Host = "localhost"

    LocalPath = "/ReportManage/ReportWindow.aspx"


    OriginalString = "http://localhost:18725/ReportManage/ReportWindow.aspx?action=PickGoodsInfo&keyid=4ffeb15b-c269-451a-95a0-1eb22cbefd18"


    PathAndQuery = "/ReportManage/ReportWindow.aspx?action=PickGoodsInfo&keyid=4ffeb15b-c269-451a-95a0-1eb22cbefd18"


    Query = "?action=PickGoodsInfo&keyid=4ffeb15b-c269-451a-95a0-1eb22cbefd18"


    Segments = {string[3]}
    [0] = "/"
    [1] = "ReportManage/"
    [2] = "ReportWindow.aspx"

     顺便给出以下地址的方法,给到多少级,自己看着用Length-n

     http://localhost:18725/ReportManage/

                string[] webnet=new string[Context.Request.Url.Segments.Length-1];

                Array.Copy (Context.Request.Url.Segments,webnet ,Context.Request.Url.Segments.Length-1);

    Context.Request.Url.Authority + string.Join("", webnet) 

    网上90%的,不知道是不是版本的问题,都是错误的,寒一个!!

  • 相关阅读:
    I
    H
    装箱问题
    E
    Oracle创建视图(View)
    (转)Navicat Premium 12.1.8.0安装与激活
    bigdecimal 保留小数位
    用命令修改Oracle数据库密码
    sql中exists,not exists的用法
    在Orcl中通过SQL语句修改创建表
  • 原文地址:https://www.cnblogs.com/szyicol/p/1808762.html
Copyright © 2011-2022 走看看