zoukankan      html  css  js  c++  java
  • Asp.NET获取文件及其路径

    Asp.NET获取文件及其路径
    【相对路径】
    Request.ApplicationPath/src
    Path.GetDirectoryName(HttpContext.Current.Request.RawUrl )//src//Xiaoshe
    Context.Request.Path/src/Xiaoshe/Xiaoshe_New.aspx
    Context.Request.CurrentExecutionFilePath/src/Xiaoshe/Xiaoshe_New.aspx
    Context.Request.FilePath/src/Xiaoshe/Xiaoshe_New.aspx
    HttpContext.Current.Request.RawUrl /src/Xiaoshe/Xiaoshe_New.aspx
    HttpContext.Current.Request.Urlhttp://localhost:1344/src/Xiaoshe/Xiaoshe_New.aspx
    TemplateSourceDirectory/src/Controls
    【绝对路径】
    Server.MapPath("./") E://Wonsoft//Pro2//src//Xiaoshe//
    Server.MapPath("") E://Wonsoft//Pro2//src//Xiaoshe
    Context.Request.PhysicalApplicationPathE://Wonsoft//Pro2//src//
    Context.Request.PhysicalPath E://Wonsoft//Pro2//src//Xiaoshe//Xiaoshe_New.aspx
    MapPathSecure(TemplateSourceDirectory)E://Wonsoft//Pro2//src//Controls string
    【其他】
    Control.ResolveClientUrl(string relativeUrl)
    Control.ResolveUrl(string relativeUrl)
  • 相关阅读:
    安卓手机!用swiper做轮播效果,两张图片之间会有一个像素的空白
    手机端swiper快速滑动会有白屏
    axios请求下载excel文件
    人人都能学会的webpack5搭建vue3项目(二)配置Vue
    人人都能学会的webpack5搭建vue3.0项目,可应用于生产环境 (一)
    mybatis 生成 mapper文件
    超强工具类系列
    mybatis 自动生成mapper文件
    面试
    linux安装mysql8.0.25
  • 原文地址:https://www.cnblogs.com/zhxshseu/p/5292234.html
Copyright © 2011-2022 走看看