<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET 1.1 server control for &amp;lt;link&amp;gt; - enabling relative URL paths using tilde &amp;quot;~&amp;quot;</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx</link><description>Here's a simple - but useful Link webcontrol class that supports the "~" tilde syntax for relative paths for the href attribute of the &amp;lt;link&amp;gt; element. [DefaultProperty("Text"),ToolboxData("&amp;lt;{0}:Link runat=server Href=\"\" Rel=\"Stylesheet\" Type</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#6776698</link><pubDate>Wed, 10 Dec 2008 14:31:45 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6776698</guid><dc:creator>blag</dc:creator><author>blag</author><description>&lt;p&gt;Easier way? &amp;nbsp;Use ResolveURL&lt;/p&gt;
&lt;p&gt;&amp;lt;link href='&amp;lt;%= ResolveUrl(&amp;quot;~/Css/blah.css&amp;quot;) %&amp;gt;' rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6776698" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#5837266</link><pubDate>Thu, 21 Feb 2008 23:21:27 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5837266</guid><dc:creator>Cristiano</dc:creator><author>Cristiano</author><description>&lt;p&gt;Thanks, it helped me a lot :)&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5837266" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#2026704</link><pubDate>Wed, 14 Mar 2007 16:40:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2026704</guid><dc:creator>Javier Callico</dc:creator><author>Javier Callico</author><description>&lt;p&gt;Good idea. I used it as start point for a culture-aware link custom control. I'll post the code on my website &lt;a rel="nofollow" target="_new" href="http://www.callicode.com/"&gt;http://www.callicode.com/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2026704" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#455574</link><pubDate>Wed, 05 Jul 2006 10:20:47 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:455574</guid><dc:creator>Carlo Bertini</dc:creator><author>Carlo Bertini</author><description>&lt;p&gt;Good tips, many thx&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=455574" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#444205</link><pubDate>Thu, 27 Apr 2006 16:12:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:444205</guid><dc:creator>Wim Hollebrandse</dc:creator><author>Wim Hollebrandse</author><description>JJ - yep aware of that, but for our needs we had to also dynamically set the stylesheet, hence the need for the control to be a server control. And as I'm sure you're aware, you can't use the classic ASP &amp;lt;% %&amp;gt; syntax in a server control.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=444205" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#444203</link><pubDate>Thu, 27 Apr 2006 16:04:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:444203</guid><dc:creator>JJ</dc:creator><author>JJ</author><description>An alternative in .NET 1.1 is to use the old ASP &amp;lt;% %&amp;gt; syntax:&lt;br&gt;&amp;lt;link href='&amp;lt;% =ResolveUrl(&amp;quot;~/my.css&amp;quot;) %&amp;gt;' ...&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=444203" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET 1.1 server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#444193</link><pubDate>Thu, 27 Apr 2006 14:43:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:444193</guid><dc:creator>Wim Hollebrandse</dc:creator><author>Wim Hollebrandse</author><description>Furthermore, the HtmlLink class in ASP.NET 2.0 already supports the &amp;quot;~&amp;quot; syntax for its href attribute, so in ASP.NET 2.0, all you need to do is add runat=&amp;quot;server&amp;quot; to the link element and you can use the tilde in the href without a problem.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=444193" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET server control for &lt;link&gt; - enabling relative URL paths using tilde "~"</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#444182</link><pubDate>Thu, 27 Apr 2006 13:31:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:444182</guid><dc:creator>Wim Hollebrandse</dc:creator><author>Wim Hollebrandse</author><description>Sean,&lt;br&gt;&lt;br&gt;I should've mentioned that this is a .NET 1.1 solution. The HtmlLink class is the correct class to use when using .NET 2.0, but does not exist in .NET 1.1 or 1.0.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;Wim&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=444182" width="1" height="1"&gt;</description></item><item><title>Cleaner solution?</title><link>http://weblogs.asp.net/wim/archive/2006/04/27/444169.aspx#444181</link><pubDate>Thu, 27 Apr 2006 13:15:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:444181</guid><dc:creator>Sean</dc:creator><author>Sean</author><description>Hi,&lt;br&gt;rather than doing this, i'd look into HtmlLink control implementation. It does the same thing, almost. The only think you'd need to do is to modify the HREF attribute by substituting the base value with the new updated one. Less coding, and definately more OOP. :)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=444181" width="1" height="1"&gt;</description></item></channel></rss>