用于 IIS 目录浏览的 asp 超链接

发布于 2025-01-05 23:49:47 字数 297 浏览 2 评论 0原文

我一直在尝试这个,但今天似乎并不适合我。我想要一个指向日志文件夹的超链接,该文件夹在 IIS 中启用目录浏览,但 ASP.NET 不喜欢该链接,因此它甚至不将其发送到客户端。

<asp:HyperLink ID="HyperLink8" NavigateUrl="~/logs/" runat="server"></asp:HyperLink>

我这样做的原因是日志链接位于母版页的页脚中。我无法控制虚拟目录名称,因此无法有效使用锚标记。以前有人遇到过这种情况吗?

谢谢,

I have been trying this and it does not seem like it wants to work out for me today. I want to have an hyperlink to a log folder which in IIS is enabled with directory browsing but asp.net does not like the link so it does not even send it to the client.

<asp:HyperLink ID="HyperLink8" NavigateUrl="~/logs/" runat="server"></asp:HyperLink>

The reason why I am doing this is that the log link is in the footer of the master page. I cannot control the virtual directory name so I cannot effectively use the anchor tag. Any one encountered this before ?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

治碍 2025-01-12 23:49:47

它可能正在将链接发送到客户端,但如果不设置 Text 值,它将不可见。

It probably is sending the link to the client, but without setting the Text value it will be invisible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文