Page_Load question
<p>I have this javascript modal which I want to use for error reporting. Everything works well only that the code gets executed before page load. So the result is that I have my javascript before the head tag  which means nothing gets executed!</p>

<p>Any help?</p>

<pre><code>public void showError(string error)
{
    string script = "&lt;script type=\"text/javascript\"&gt;$.facebox.settings.opacity = 0.4;jQuery.facebox(\""+error+"\");&lt;/script&gt;";        
    System.Web.HttpContext.Current.Response.Write(script);        
}
</code></pre>

<p>By the way, my ShowError method is within a class called ErrorDisplay
This is how I call it:</p>

<pre><code>string strErr = "error here";
            ErrorDisplay myError = new ErrorDisplay();
            myError.ShowError(strErr);
</code></pre>
