title: How to create URL from ASP.Net Web Form class name
body: <p>I have two classes that inherit from System.Web.UI.Page (two web pages) as seen below.</p>
  
  <h3>~/Catalogs/Item.aspx.cs</h3>
  
  <pre><code>public partial class Item: System.Web.UI.Page
  {
      protected global::System.Web.UI.WebControls.HyperLink DownloadLink;
  
      protected void Page_Load(object sender, EventArgs e)
      {
          // I expect this to be "~/Catalogs/Download.aspx"
          // How can I implement this method?
          this.DownloadLink.NavigateUrl = GetTheUrlFor(new Download());
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <h3>~/Catalogs/Download.aspx.cs</h3>
  
  <pre><code>public partial class Download : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          // Perform the download here
      }
  }
  </code></pre>
  
  <p>How can I implement the method <code>GetTheUrlFor(page)</code> to return the URL for a given Page?</p>
  
  <hr>
  
  <p><em>Update1</em>: this is a ASP.NET Web Application project on .NET 4.5</p>
  
  <p><em>Update2</em>: Request.Url will not work because it gets the URL of the current page but I want the URL of a different page</p>