The HtmlAnchor class can resolve virtual paths if you use the HRef property but can't if you set the attribute via the Attributes collection, I think. Definitely, it has screwy behavior, particularly if you're trying to use named anchors, e.g., <a href="#foo">Go
to foo</a> and <a id="foo">Here's foo</a>. ASP.NET overriding the id attribute for its own purposes particularly sucks for this HtmlAnchor use case and is one of many reasons I am getting sick of WebForms. I love the low-level ASP.NET/IIS platform, but I'm
looking forward to booting WebForms as soon as ASP.NET MVC is golden.