The following example returns the physical path of the virtual directory that contains the specified Web site.
FilePath = Server.MapPath("MyWebSite");除了这个方法还有别的好方法么?
FilePath = Server.MapPath("MyWebSite");除了这个方法还有别的好方法么?
解决方案 »
- 找不到content控件啊!
- 求教.net里使用jquery ajax的方法
- 路由器及IIS设置的问题
- 能详细解释一下:Request.ApplicationPath,~/,/,./,../及其用法(可时用)吗?老是在相对路径问题上出错。
- Super级别—”急“需无限级下拉菜单,有数据库的!毕业论文用!!!急要,没有拿不到毕业证!!望大家鼎立帮忙!!!
- 能告诉我怎样才能添加tabstrip控件,工具箱里没有啊
- 如何获取数据表的当前记录?
- 请问web开发时使用这种方法操作数据库是否存在缺陷?
- 求助
- 有个叫aspedit的软件怎么获得 谢谢
- 简单问题--datalist如何返回值!!
- 我的命名空间里怎么没有这些数据库组件?
如果 在 http://www.mysite.com/page/subfolder1/subfolder2/1.aspx 中,怎样访问位于站点根目录中的资源?
Dim RawUrl As String = Request.RawUrl
Dim RootUrl As String
RootUrl = Left(AbsUri, Len(AbsUri) - Len(RawUrl)) & Request.ApplicationPath上述最后一行的“ & Request.ApplicationPath”用于虚拟目录
Label2.Text = (string)n.GetValue("/");
记得把后面的数字去掉就搞定了。
<appSettings>
<add key="TreeFile" value="E:\\Admin\\AdminEnd\\XML\\" />
<add key="WebAdminID" value="1" />
</appSettings>在程序中:
ConfigurationSettings.AppSettings["TreeFile"]