sethupathiram wrote:
page.ClientScript.RegisterClientScriptBlock(typeof(Alert), "alert", script);
Try:
btnSave.Attributes.Add("onclick", "alert('Hi There!');");
UPDATE:
For showing alert from server side after some operation, try:
string script = "alert('Hi There2!');";
Page.ClientScript.RegisterClientScriptBlock(Page, this.GetType(), "ShowAlert", script, true);