如何在asp.net中映射物理路径 [英] How map a physical path in asp.net

查看:127
本文介绍了如何在asp.net中映射物理路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨......
这是洛克什

我的问题是?

我想在asp.net的网格视图中显示文件和文件夹

我搜索了所有显示的示例,这些示例仅在显示的网站文件中显示(这表示网站在文件夹中运行的位置)

但我想映射物理目录,如
exp :(另一个驱动器,例如网站未运行的驱动器,我想要的)
E:\ ramu \ softwares \ allfiles \ data.xml
但是

我尝试过这样

DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("./WebSite"));

但它只显示虚拟目录



请任何人帮我解决我的请求

hi......
this is lokesh

my question is?

i want to display files and folders in grid view in asp.net

i searched all examples showing with in the website files only displayed (that mean where website is running in the folder)

but i want to map the physical directory like
exp:(another drives like where websiteis not running that drive i want)
E:\ramu\softwares\allfiles\data.xml
but

i tried like this

DirectoryInfo dirInfo = new DirectoryInfo(Server.MapPath("./WebSite"));

but it showing only virtual directory



please any one help to me my request

推荐答案

网站不属于您提供的文件夹路径的一部分.如果您认为可以的话,您将看不到服务器上网站根目录的上方,也根本看不到客户端文件系统.您不知道ASP.NET的工作原理或功能
Website is not part of the folder path you provided. You can''t see above the website root on the server, and you can''t see the client file system at all, if you think you can,. you have no idea how ASP.NET works or what it does


这篇关于如何在asp.net中映射物理路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆