相对于应用程序根链路与客户端标签 [英] Link relative to Application root with client tag

查看:73
本文介绍了相对于应用程序根链路与客户端标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法在客户端标签〜字符(或类似的东西)链接到应用程序根目录(例如小于链接>)?我有一些外部样式表和脚本,我需要在一个母版页链接到,但我不想硬$ C $相对于IIS站点路径C,我想根据相关应用的道路上做到这一点。

Is there any way to link to the application root with the ~ character (or something similar) in a client tag (e.g. <link>)? I have some external stylesheets and scripts that I need to link to in a Master page, but I don't want to hardcode the path relative to the IIS site, I want to do it based on the relative application path.

推荐答案

是,使用&LT;链接HREF =&LT;%= RESOLVEURL(〜/ MEEP / moop.css)%&GT ; /方式&gt;

不解决方案的prettiest,但你应该只用它在开发过程中几次...

Not the prettiest of solutions, but you should only use it a couple of times during development...

这篇关于相对于应用程序根链路与客户端标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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