RegisterStartupScript no longer working in asp.net
<p>Mostly my website is working with ajax, but if I need to send a message on page load I want it to be in the same style as everywhere else, so I am using the following method on my master page:</p>

<pre><code>public void showWarning(String message)
{
    Page.ClientScript.RegisterStartupScript(this.GetType(),"svrShowWarning","showWarning('" + message + "');",true);
}
</code></pre>

<p>This was working fine, but recently it has stopped working (I don't know when, exactly.)</p>

<p>The server simply fails to put the script on the page at all - looking at the page source in my web browser, I can see that the script is not present.</p>

<p>Before, I had a form with a <code>runat=server</code> tag enveloping all the content on my master page, but I took this out. I wondered if this may be the cause?</p>

<p>What is a good way to get some simple javascript like this to fire on my page, after everything has loaded?</p>
