I am trying to call javascript from the page code behind on a button click using the following code.
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("<script language=\"javascript\">");
sb.Append("alert(\"Some Message\")");
sb.Append("</script>");
ClientScript.RegisterStartupScript(this.GetType(), "Alert", sb.ToString());
But the javascript is not getting called.
All I want to achieve from this is a popup msg on button click. I dont want to prevent server code execution.