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

    Response.Redirect("/Foo/Bar.aspx");

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:

    Response.Redirect( MyNamespace.BarPage.GetUrl() );

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.

Isn't there a better way?
Referencing other ASP.NET pages symbolically, with compile-time checks?
===

I'm noticing code accumulating in my project that looks like this:

    Response.Redirect("/Foo/Bar.aspx");

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:

    Response.Redirect( MyNamespace.BarPage.GetUrl() );

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.

Isn't there a better way?