call javascript function from code behind
<p>I have this JavaScript code in ASPX page  </p>

<pre><code>&lt;script&gt;
    function show_modal(statut) 
    {
        if (statut == true)
        {
            $(function () 
            {
                $('#modal_success').modal('show')
            })
        }
        else
        {
            $(function ()
            {
                $('#modal_fail').modal('show')
            })
        }
     }
&lt;/script&gt;
</code></pre>

<p>That shows an modalpopup wich I like to launch from my code behind.</p>

<p>I tried this, but it didn't work:</p>

<pre><code>if (resultat)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "show_modal(true);");

        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "show_modal(false);");
        }
</code></pre>

<p>but I can't figure out why!</p>
