Message Box for ASP.NET 2.0


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. private void Alert(string Message)
  2. {
  3. string strScript = "<script language=JavaScript>alert(\"" + Message + "\");</script>";
  4.  
  5. if (!ClientScript.IsStartupScriptRegistered("clientScript"))
  6. {
  7. ClientScript.RegisterClientScriptBlock(this.GetType(), "clientScript", strScript);
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.