You can try:
string script = "<script language='JavaScript'>alert('hello');</script>";
Page.RegisterStartupScript("myscript", script);
or
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", "<script>alert('Hello.')</script>", false);
source
share