Page.ClientScript.RegisterStartupScript(this.GetType(), “keyForScript”, “alert(‘This is Server side alert box!’)”, true);
ScriptManager.RegisterClientScriptBlock(this,this.GetType(), “key”, “alert(‘This is Server side alert box!’)”, true); //for update panel,have to include “using System.Web.UI;”
Enjoy javascript from Server side
But why it not good?