1. 在.Net中web开发时
(1) ~/在runat=server的控件中会自动被解析为Request.ApplicationPath的值,是当前应用程序的目录 如

~/userCommunity/index.aspx则对应为/HENU.RCenter.Internal/UserCommunity
(2) ./表示当前目录
(3)../表示上一层目录 如UserCommunity文件夹下的文件中可以以:../module/来访问module中的文件
2 获取当前请求页面的路径:Request.FilePath
3 获取项目下的文件路径:
string path=AppDomain. CurrentDomain .SetUpInformation.Applicationbase+文件夹+文件
如获取项目下的temp文件夹下文件的路径

可以用:string savePath = AppDomain.CurrentDomain.SetupInformation.Applicationbase + "temp" + @"" + filename
4 Server.MapPath用法:

若在项目下Content文件夹下的UserInfoManager.aspx代码中写如下路径
this.tempPath = Server.MapPath("UploadResourceImage");
则返回 D:wxm练习ContentUploadResourceImage