1
<asp:Button ID="btn_create" runat="server" 
        Text="Create Weekly Report" 
        OnClick="btn_create_Click" />

This is a user button and code behind is

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

I want to call the javascript functionif the first condition is true. but it is not working.
My javascript function is

function openWinContentTemplate() {
    $find("RadWindow_ContentTemplate").show();
}

This opens a radwindow if the condition is satisfied.
Its not working could anyone plz help me out.

naveen
  • 53,448
  • 46
  • 161
  • 251

1 Answers1

0

I would suggest using AJAX to call the method and make the method return something meaningful. If all you want to do is show an element, make the method return a boolean.

mithun_daa
  • 4,334
  • 5
  • 38
  • 50