Asp.net add script to page header from string variable
<p>I need to display ADS from an AD server to my ASP.NET pages. I am storing the scripts (as part of my settings) in the db. How can I add the script to the page header at runtime after loading it into a string variable? Here is the script</p>

<pre><code>&lt;script type="text/javascript"&gt;var proto = "http:"; if (document.location.protocol == "https:") { proto = "https:" }var z=document.createElement("script");z.type="text/javascript";z.async=true;z.src= proto + "//static.adserver.net/ad.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(z, s);&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var ad = ad || {};
ad.run = ad.run || [];
ad.run.push(function() {
&lt;!-- load placement for account: youraccount, site: yoursite, size: 500x120 - 500x120--&gt;
ad_add_placement(1234, 99999, "abc12345", 12);
ad_load();
});&lt;/script&gt;
</code></pre>

<p>I've seen examples where you can load the script without the tags e.g. </p>

<pre><code>//HtmlGenericControl HTMLControl = new HtmlGenericControl() { TagName = "script" };    //HTMLControl.Attributes.Add("type", @"text\javascript");
//HTMLControl.InnerText = myScript;
//this.Page.Header.Controls.Add(HTMLControl);
</code></pre>

<p>In my case, however, I would prefer to keep my script the same as I receive from the AD server without altering it.</p>
