title: ASP.NET WebForms Routing causing problems with js, css and images
body: <p>I am going through a weird problem right now regarding routing in ASP.NET WebForms. The only reason I am trying to use routing is to achieve better looking URLs and nothing else. Also, this is the first time ever I am trying to implement routing.</p>
  
  <p>My goal is simply:
  www.domain.com/default.aspx --> www.mydomain.com/Home-Page</p>
  
  <p>So, I have implemented the following in my global.asax</p>
  
  <pre><code>Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
      RegisterRoutes(RouteTable.Routes)
  End Sub
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Sub RegisterRoutes(ByVal routes As RouteCollection)
      routes.MapPageRoute("homepage", "Home-Page", "~/Default.aspx")
  End Sub
  </code></pre>
  
  <p>The goal is achieved however, all the images on my pages disappeared for logical reasons;
  instead of locating <code>img/someimage.png</code> it was trying to get <code>Home-Page/img/someimage.png</code></p>
  
  <p>Now, I can of course correct the path for my images but that is going to take quite a long time. I would gladly get rid of routing instead.</p>
  
  <p>My question:
  Is there any way to prevent folders (images, css, js etc.) from getting affected by the routing mechanism and only achieve nice URLs?</p>