ASP.NET 4 routing question <p>I am trying to do the following in my Global.asax file:</p> <p>At the moment i have to define my route like this:</p> <pre><code>routes.MapPageRoute( "ViewPage", "pages/{slug}", "~/viewpage.aspx", false ); </code></pre> <p>Notice the word pages before the <code>{slug}</code></p> <p>Now if i define it like this:</p> <pre><code>routes.MapPageRoute ( "ViewPage", "{slug}", "~/viewpage.aspx", false ); </code></pre> <p>It does not work.</p> <p>My CSS and JS files wont load, i get a 404.</p> <p>But, if i do this:</p> <pre><code>routes.MapPageRoute ( "ContactPage", "contact", "~/contact.aspx", false ); </code></pre> <p>It works fine??</p> <p>Basically i want my urls to look like this:</p> <p><code>example.com/contact</code> or <code>example.com/about-us</code> and it is all served dynamically from the database based on the {slug}.</p> <p>Can anyone help?</p>