Javascript popup
<p>I am trying to open this modal DIV from code behind but I am getting error message. Please let me know what's wrong with this.</p>

<p>Here is .aspx code.</p>

<pre><code>&lt;div id="modal" runat="server" style="display:none;"&gt;
    &lt;asp:Button ID="btnClose" runat="server" Text="Close" onClick="Popup.hide('modal')" CausesValidation="False"/&gt;
&lt;/div&gt;
</code></pre>

<p>Code behind </p>

<pre><code>       if (!Page.ClientScript.IsStartupScriptRegistered("MyScript"))
        {
            string confirmbox = "Popup.showModal('modal');return false;";
            Page.ClientScript.RegisterClientScriptBlock(GetType(), "MyScript", confirmbox, true);
        }
</code></pre>
