<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peter Törnstrand &#187; asp.net</title>
	<atom:link href="http://www.tornstrand.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tornstrand.com</link>
	<description>Drupal, PHP and web developing</description>
	<lastBuildDate>Fri, 16 Apr 2010 07:04:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ASP.NET anchor link in user control</title>
		<link>http://www.tornstrand.com/2008/02/20/aspnet-anchor-link-in-user-control/</link>
		<comments>http://www.tornstrand.com/2008/02/20/aspnet-anchor-link-in-user-control/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 14:57:29 +0000</pubDate>
		<dc:creator>peter</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[user control]]></category>

		<guid isPermaLink="false">http://www.tornstrand.com/2008/02/20/aspnet-anchor-link-in-user-control/</guid>
		<description><![CDATA[Ran into a strange bug today while trying to make an anchor link inside a user control i ASP.NET. The obvious way to do it would be to just to put the anchor ID inside the NavigateUrl attribute of the HyperLink control like NavigateUrl=&#8221;#anchor&#8221;. That however resulted in the link and anchor pointing to the [...]]]></description>
			<content:encoded><![CDATA[<p>Ran into a strange bug today while trying to make an anchor link inside a user control i ASP.NET. The obvious way to do it would be to just to put the anchor ID inside the <em>NavigateUrl </em>attribute of the <em>HyperLink</em> control like <em>NavigateUrl=&#8221;#anchor&#8221;</em>. That however resulted in the link and anchor pointing to the directory where the user control was located.<span id="more-11"></span></p>
<p>So I tried to put the application root modifier in front of the anchor like <em>NavigateUrl=&#8221;~/#anchor&#8221;</em>. That resulted in the anchor being printed twice in the resulting link, <em>Default.aspx#anchor#anchor</em>. This must be a bug for I can&#8217;t imagine any sane use for this kind of behavior.</p>
<p>The solution I came up with was to construct the anchor link manually in my code behind file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tornstrand.com/2008/02/20/aspnet-anchor-link-in-user-control/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
