title: ASP.NET MVC URL auto-resolution in CSS files
body: <p>In normal WebForms scenario, any root-relative URLs (e.g. ~/folder/file.txt) <strong>inside</strong> CSS files such as:</p>
  
  <pre><code>.form { background-image: url(~/Content/Images/form_bg.gif); }
  </code></pre>
  
  <p>will automatically get resolved during runtime if I specify</p>
  
  <pre><code>&lt;head runat="server"&gt;
  </code></pre>
  
  <p>In the referencing page.</p>
  
  <p>However, that is no longer happening on an ASP.NET MVC Beta1 website.</p>
  
  <p>Is there a way I could enable this functionality without resorting to hacks or CSS-loader file? Like maybe HttpModules or something?</p>
  
  <p>Or am I not desigining my website correctly? What is supposed to be a good design?</p>
  
  <p>Since original ASP.NET WebForms already has this feature, I'd prefer to utilize any existing functionality if possible. But I don't have much clue.</p>
  
  <p>This web application will be deployed in several environments where the ~ root folder might not be obvious.</p>
  
  <hr>
  
  <p><strong>EDIT:</strong> I mean the url in the file's CONTENT not the file's url itself.</p>