Server.Execute(path)..执行的页面返回调用页面'来自 request.url 的 url
正如标题中所解释的,我在获取从页面内执行的页面的 URL 时遇到问题。
基本上我有一个动态目录,客户可以在其中选择他们感兴趣的产品。我正在做这件事的公司的经理希望能够在任何给定时间创建最新的离线目录,以发送给需要的客户没有互联网连接。到目前为止一切进展顺利。我使用 Server.Execute 获取每个页面的内容,然后将其放入静态 html 页面中并将动态链接更改为静态 html 链接(即将所有 aspx 链接更改为 htm)。我能够输出关于我们、联系我们、主页和整个目录的所有页面。但是,基于 URL 包含在页面中的样式表之一(如果该页面位于管理部分,则不包含它,否则包含)并未包含在应该包含在页面中的样式表。我尝试输出 URL,但它只返回调用页面的 URL,而不是被调用的页面。有谁知道为什么会发生这种情况?
任何帮助将不胜感激。
此致,
理查德·克拉克
As explained in the title, I am having a problem with getting the URL of the page being executed from within a page.
Basically I have a dynamic catalogue, where customers select products they are interested in. The manager of the company I am doing this for would like to be able to create an up to date offline catalogue at any given time, to send out to customers who dont have an internet connection. So far its going really well. I am using Server.Execute to get the content for each page, then putting it in static html pages and changing the dynamic links to static html links (ie changing all aspx links to htm). I am able to output all the pages for about us, contact us, home, and the entire catalogue. However, one of the stylesheets which is included in the page based on the URL (if the page is in the administration section then it is not included, otherwise it is) is not being included in the pages when it should be. I have tried outputting the URL but it just returns the URL of the calling page, not the page being called. Does anyone have any idea why this is happening?
Any help would be greatly appreciated.
Regards,
Richard Clarke
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此行为是设计使然。
(
Request.Url
是客户端请求的 URL)This behavior is by design.
(
Request.Url
is the URL that was requested by the client)