johnslattery
11/10/2017 - 3:55 PM

asp .net c# message box

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