/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private void Alert(string Message) { string strScript = "<script language=JavaScript>alert(\"" + Message + "\");</script>"; if (!ClientScript.IsStartupScriptRegistered("clientScript")) { ClientScript.RegisterClientScriptBlock(this.GetType(), "clientScript", strScript); } }