I have created a control with a RenderingTemplate for a customized ContentType that includes extra buttons. If one of the buttons in the code behind fails, I want to notify the user with a message box.
Here is what I attempted:
string script = "<script language='javascript'>MsgBox('" + errorMessage + "')</script>";
Page.ClientScript.RegisterClientScriptBlock(GetType(), "Register", script);
However, the message box does not appear and I cannot locate the javascript code in the rendered page. What am I missing? Is there a specific SharePoint 2010 message box class that I should be using?