Pass parameters to javascript function of user control
<p>I'm adding user control dynamically on my page.</p>

<p><strong><code>MyPage.aspx</code>:</strong></p>

<pre><code>MyControl cntl = (MyControl)Page.LoadControl("MyControl.ascx");
</code></pre>

<p><strong>The <code>MyControl.ascx</code> has a javascript function:</strong></p>

<pre><code>function myfun(a, b)
{
    ....
}
</code></pre>

<p>I can pass parameters to <code>myfun</code> from code behind of <code>MyControl.ascx</code> like:</p>

<pre><code>string script2 = String.Format("myfun({0},{1})", param1, param2);
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "initialize control", script2, true);
</code></pre>

<p>Is it possible to call this javascript function from <code>MyPage.aspx</code>?</p>
