Referencing other ASP.NET pages symbolically, with compile-time checks?
<p>I'm noticing code accumulating in my project that looks like this:</p>

<pre><code>Response.Redirect("/Foo/Bar.aspx");
</code></pre>

<p>This seems brittle -- if I move or rename Bar.aspx file, I need to find places where I've referenced it and correct those string constants, both in markup and codebehind.  It seems like their should be a better way.  Something like:</p>

<pre><code>Response.Redirect( MyNamespace.BarPage.GetUrl() );
</code></pre>

<p>In other words, let the 'stack' figure out the URL I need.  Note: I know that I can consolidate references to a particular page with a hand-coded BarPage.GetUrl() method, but even that seems failure-prone.</p>

<p>Isn't there a better way?</p>
