如何获取当前文件的虚拟路径!

来源:互联网 发布:linux zip.gz解压 编辑:程序博客网 时间:2024/06/08 18:35
如何获取当前文件的虚拟路径!
IServiceProvider provider=(IServiceProvider)HttpContext.Current;
HttpWorkerRequest wr = (HttpWorkerRequest)provider.GetService(typeof(HttpWorkerRequest));
string virtual_path =wr.GetFilePath().ToString();
原创粉丝点击