从子文件夹访问aspx页面到文件夹aspx页面外的问题

编程入门 行业动态 更新时间:2024-10-22 07:20:36
本文介绍了从子文件夹访问aspx页面到文件夹aspx页面外的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好,我创建了一个文件夹Admin,其中我创建了一个包含aspx页面的子文件夹....当我访问这些文件夹之外的页面时,它显示一个错误,需要页面不退出。 PLZ帮助我...... 这两个页面都有不同的母版页。

hello, i made a folder Admin in which i made another subfolder that consists on a aspx pages....when i access a page that is outside these folders thus it shows me an error that required page does not exit. plz help me... and both these pages have different master pages.

推荐答案

使用相对URL。就这样。检查你的相对路径是否正确。
-SA
Use relative URLs. That's all. Checkup that your relative path is correct.
—SA

你需要使用RelativeURls作为谢尔盖提到并且只是为了获得更多信息,你可以参考下面的例子: You need to use RelativeURls as Sergey mentioned and only for more information you can refer the following example: Website AdminFolder SuperAdminFolder Page2.aspx Page3.aspx UserFolder SuperUserFolder Page5.aspx Page4.aspx Page1.aspx

要从Page2访问Page3,您可以使用../Page3.aspx作为路径 要从Page2访问Page1,您可以使用〜/ Page1.aspx作为路径 要从Page2访问Page5,您可以使用../../Users/SuperUser/ Page5.aspx或〜/ Users / SuperUser / Page5.aspx作为路径 基本上您可以使用以下符号来访问您的页面: 。文件的当前物理目录(例如aspx)正在执行 ..父目录 〜应用程序根目录的物理路径

To access to Page3 from Page2 you can use "../Page3.aspx" As the path To access to Page1 from Page2 you can use "~/Page1.aspx" As the path To access to Page5 from Page2 you can use "../../Users/SuperUser/Page5.aspx" or "~/Users/SuperUser/Page5.aspx" As the path Basically you can play with following symbols to access your page : "." the current physical directory of the file (e.g. aspx) being executed ".." The parent directory "~" The physical path to the root of the application

更多推荐

从子文件夹访问aspx页面到文件夹aspx页面外的问题

本文发布于:2023-11-09 21:08:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573442.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   页面   从子   aspx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!