protected void MsgBox(string key, string msg)
{
StringBuilder script =
new StringBuilder().AppendFormat("alert('{0}');", msg.Replace("'", @"\'"));
ScriptManager.RegisterClientScriptBlock(this, GetType(), key, script.ToString(), true);
}