page.ClientScript.RegisterClientScriptBlock has to be called from code-behind?
<p>Do I have to call this from within page load?  OR can I do something like this in my .aspx page:</p>

<pre><code>&lt;%=SomeClass.RegisterMyScript(this, (int)Code.Home, UserId, "Home", 0, "", 0, 0, "" ) %&gt;
</code></pre>

<p>I've got this at the bottom of my .aspx page.</p>

<p>The method RegisterMyScript has the following inside it:</p>

<pre><code>    if (!page.ClientScript.IsClientScriptBlockRegistered("cartScript"))
        page.ClientScript.RegisterClientScriptBlock(typeof(Page), "cartScript", finalScript);
</code></pre>

<p>I do'nt know if by the time the page has already rendered if this will still work.  My guess is that I'm required to do it in page init or load but thought maybe I can still do it outside those initial load functions.</p>
