JavaScript method is not calling from backend
<p>In my page I have a login control:</p>

<pre><code>&lt;asp:Login ID="EMSLogin" runat="server" OnAuthenticate="EMSLogin_Authenticate"&gt;
    &lt;LayoutTemplate&gt;
        &lt;asp:Panel ID="Panel1" runat="server" CssClass="wrapper"&gt;
            &lt;asp:Panel ID="Panel2" runat="server" CssClass="holder"&gt;
                &lt;asp:Panel ID="Panel3" runat="server" CssClass="loginBox one_edge_shadow"&gt;
                    &lt;h1&gt;
                        Login Credentials&lt;/h1&gt;
                    &lt;asp:Panel ID="Panel4" runat="server" CssClass="name topmargin"&gt;
                        &lt;asp:Panel ID="Panel5" runat="server" CssClass="label"&gt;
                            &lt;asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"&gt;User Name:&lt;/asp:Label&gt;
                        &lt;/asp:Panel&gt;
                        &lt;asp:Panel ID="Panel6" runat="server" CssClass="textBox"&gt;
                            &lt;telerik:RadTextBox ID="UserName" runat="server" Height="16px" Width="165px" Font-Size="14px"
                                Font-Names="Arial Sans-Serif" ToolTip="Enter your valid login name" /&gt;
                            &lt;asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                ValidationGroup="EMSLogin"&gt;*&lt;/asp:RequiredFieldValidator&gt;
                        &lt;/asp:Panel&gt;
                        &lt;br class="clearfix" /&gt;
                    &lt;/asp:Panel&gt;
                    &lt;asp:Panel ID="Panel7" runat="server" CssClass="name topmargin"&gt;
                        &lt;asp:Panel ID="Panel8" runat="server" CssClass="label"&gt;
                            &lt;asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"&gt;Password:&lt;/asp:Label&gt;
                        &lt;/asp:Panel&gt;
                        &lt;asp:Panel ID="Panel9" runat="server" CssClass="textBox"&gt;
                            &lt;telerik:RadTextBox ID="Password" runat="server" TextMode="Password" Height="16px"
                                Width="165px" Font-Size="14px" Font-Names="Arial Sans-Serif" ToolTip="Enter your valid password" /&gt;
                            &lt;asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                ValidationGroup="EMSLogin"&gt;*&lt;/asp:RequiredFieldValidator&gt;
                        &lt;/asp:Panel&gt;
                        &lt;br class="clearfix" /&gt;
                        &lt;telerik:RadButton ID="LoginButton" runat="server" CommandName="Login" Text="Log In"
                            CssClass="loginButton" Font-Size="14px" Width="100px" ValidationGroup="EMSLogin"
                            ToolTip="Click to log in" /&gt;
                    &lt;/asp:Panel&gt;
                &lt;/asp:Panel&gt;
            &lt;/asp:Panel&gt;
        &lt;/asp:Panel&gt;
    &lt;/LayoutTemplate&gt;
&lt;/asp:Login&gt;
</code></pre>

<p>I have added the ScriptManager control to the page.</p>

<p>Now the <code>EMSLogin_Authenticate</code> is:</p>

<pre><code>protected void EMSLogin_Authenticate(object sender, AuthenticateEventArgs e) {
    RadTextBox UserName = EMSLogin.FindControl("UserName") as RadTextBox;
    RadTextBox Password = EMSLogin.FindControl("Password") as RadTextBox;

    if (Membership.ValidateUser(UserName.Text, Password.Text)) {
       FormsAuthentication.RedirectFromLoginPage(UserName.Text, false);
    } else {
       Page.ClientScript.RegisterClientScriptBlock(typeof(ScriptManager), "CallShowDialog", "showDialog();", true);     
    }
}
</code></pre>

<p>The JavaScript method <code>showDialog();</code> is defined in the page:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function showDialog() {
        $(".jym").dialog("open");
        return false;
    }   
&lt;/script&gt;
</code></pre>

<p>But it is not calling. There is nothing wrong with <code>showDialog()</code> since I have called it on the onclick method of an anchor tag; it is showing the dialog. If I write <code>alert()</code> in place of <code>showDialog()</code> in code behind then I can see the alert message. </p>

<p>What I am doing wrong? Is it not possible to call JavaScript in this way?</p>

<hr>

<p>This is also not working:</p>

<pre><code>System.Web.UI.ScriptManager.RegisterClientScriptBlock(this.Page, typeof(RadButton), Guid.NewGuid().ToString(), "showDialog();", true);
</code></pre>
