I'm working on a custom control that needs to register client script to the
page.
string key = "ScriptKey";
string script = "<script language=\"javascript\"> alert('Hi'); </script>";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), key, script,
false);
The code executes, but no script is rendered to the page. Is there
something I'm missing here?
I've tried moving this around even, including RenderControl(), OnLoad(),
OnPreRender(), and OnInit().
Thanks!