ASP.NET Dynamic JavaScript File
<p>I'm writing a ASP.NET web application. It dosen't use Web Forms or MVC. It uses ASP.NET Routing to a Http Handler, and the handler just writes html to the HttpContext.</p>

<p>The final output of my html is something like this:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;...&lt;/title&gt;
    &lt;script type="text/javascript"&gt;
        ...
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    ...
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Now, Instead of writing the (long) script into this page, I want to write it to another page, and then use the <code>src</code> of <code>script</code> element to reference it. The problem is, that the script is dynamic.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;...&lt;/title&gt;
    &lt;script type="text/javascript" src="..."&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    ...
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Any ideas?</p>

<p>Thanks.</p>
