title: Use ASP.NET Resource strings from within javascript files
body: <p>How would one get resx resource strings into javascript code stored in a .js file? </p>
  
  <p>If your javascript is in a script block in the markup, you can use this syntax:</p>
  
  <pre><code>&lt;%$Resources:Resource, FieldName %&gt;
  </code></pre>
  
  <p>and it will parse the resource value in as it renders the page...  Unfortunately, that will only be parsed if the javascript appears in the body of the page.  In an external .js file referenced in a &lt;script&gt; tag, those server tags obviously never get parsed.</p>
  
  <p>I don't want to have to write a ScriptService to return those resources or anything like that, since they don't change after the page is rendered so it's a waste to have something that active.</p>
  
  <p>One possibility could be to write an ashx handler and point the &lt;script&gt; tags to that, but I'm still not sure how I would read in the .js files and parse any server tags like that before streaming the text to the client.  Is there a line of code I can run that will do that task similarly to the ASP.NET parser?</p>
  
  <p>Or does anyone have any other suggestions?</p>