Common类的ShowMessage方法吧
public static void ShowMessage(System.Web.UI.Page page,string msg) { msg = msg.Replace("'", "\\'").Replace("\r\n", "\\r\\n").Replace("\"", @"\"""); //对单引号, 双引号,换行进行处理 以便在消息框中保留 Page.ClientScript.RegisterStartUpScript(page.GetType(),Guid.NewGuid().ToString(),"alert('"+msg+"')",true) }
本文来自博客园,作者:mushishi,转载请注明原文链接:https://www.cnblogs.com/mushishi/archive/2013/05/13/3076148.html