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.
Yes, use <link href="<%= ResolveUrl("~/meep/moop.css") %>" />
.
Not the prettiest of solutions, but you should only use it a couple of times during development...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With