title: How to popup a message box in SharePoint 2010
body: <p>I built a control with a RenderingTemplate for a custom ContentType. It contains additional buttons. If the code behind one button fails, I want to inform the user with a message box.</p>
  
  <p>I tried</p>
  
  <pre><code>string script = "&lt;script language='javascript'&gt;MsgBox('" + errorMessage + "')&lt;/script&gt;";
  Page.ClientScript.RegisterClientScriptBlock(GetType(), "Register", script);
  </code></pre>
  
  <p>But it doesn't show and I can't find the javascript code in the rendered page. What am I doing wrong? Is there a special SharePoint message box class in SharePoint 2010?</p>