Asp.NET获取文件及其路径
生活随笔
收集整理的這篇文章主要介紹了
Asp.NET获取文件及其路径
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
| 【相對路徑】 | ? |
| 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.Url | http://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.PhysicalApplicationPath | E://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) |
轉(zhuǎn)載于:https://www.cnblogs.com/biye/p/3284339.html
總結(jié)
以上是生活随笔為你收集整理的Asp.NET获取文件及其路径的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 李雷和韩梅梅的一次转账事务–事务系统概述
- 下一篇: Demo学习: CalendarPane