Calling JavaScript function from code beind (c#) catch block
<p>I am trying to call a JavaScript function from my ascx control code behind in the catch block.
I have tried the below two ways but they don't seem to work.</p>

<ol>
<li><p><code>Page.ClientScript.RegisterClientScriptBlock(typeof(string), "script", "test();", true);</code></p></li>
<li><p><code>ScriptManager.RegisterStartupScript(Page, GetType(), "err_msg", "alert('error');", true);</code></p></li>
</ol>

<p>The function is called if I place the code Under "PageLoad" but doesn't get called when placed in catch block.Should I do any different to call a JavaScript function from catch block. Please suggest.</p>

<p>Thanks</p>
