I have an ASP.NET application originally deployed to a .Net 1.1 Framework on Windows 2000 server which i'm now using on a Windows 2008 Server using 2.0.50727. We use the tilde (~) to resolve to an absolute path in many areas of the application and it works for things like asp:hyperlink controls (with run-at server tags), but for our bound datagrid controls which are using HyperLinkColumns to create links based on ID values returned from our database, the tilde is getting written to the page.
This code:
HyperLinkColumn oLink = new HyperLinkColumn();
oLink.DataNavigateUrlField = "IdField";
oLink.DataNavigateUrlFormatString = "~/Here{0}.aspx";
is dumping this to the page:
<a href="~/Here171201.aspx">
What changed between versions of IIS or .NET Framework could be causing this functionality to no longer work? The Tilde was definitely resolving in 1.1 - I have the exact same code deployed on a dozen 1.1 Framework servers in our organization. Unfortunately, the class that sets the DataNavigateUrlFormatString doesn't have access to the Page, so I'll have to do some kludging to insert the Page.ResolveUrl work around...