using javascript function to be called from code behind under specific condition
<pre><code>&lt;asp:Button ID="btn_create" runat="server" 
        Text="Create Weekly Report" 
        OnClick="btn_create_Click" /&gt;
</code></pre>

<p>This is a user button and code behind is</p>

<pre><code>con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (!(dr.HasRows))
{
    Page.ClientScript.RegisterStartupScript(
        this.GetType(),
        "alert", 
        "openWinContentTemplate();", 
        true);
}
else
{
    Response.Redirect("entry.aspx");
}
con.Close();
</code></pre>

<p>I want to call the javascript functionif the first condition is true.
but it is not working.<br>
My javascript function is</p>

<pre><code>function openWinContentTemplate() {
    $find("RadWindow_ContentTemplate").show();
}
</code></pre>

<p>This opens a radwindow if the condition is satisfied.<br>
Its not working could anyone plz help me out.</p>
