Using the ~ to get site root relative links in asp.net controls is really neat. You can easily create a url that reliably points to any page in you site using something like
Hyperlink1.NavigateUrl = "~/someFolder/somePage.aspx"
However this does not work for the asp.net 1.1 mobile controls for some reason, and repeating the logic is actually much harder than it should be. Take a look at these discussions if you don't believe that people struggle with this. Right at the end of that discussion, Scott Mitchell has the answer though, and here is the code I used in a utility class:
Dim
r As HttpRequest = HttpContext.Current.Request
Dim c As New System.Web.UI.Control
Dim root As String = r.Url.GetLeftPart(UriPartial.Authority) + c.ResolveUrl(r.ApplicationPath)