///
/// 显示消息 /// ///页面对象 ///消息 ///跳转页面的地址public static void ShowMessageBox(Page page, string message,string address) { string strMessageID = System.Guid.NewGuid().ToString(); if (page.ClientScript.IsStartupScriptRegistered(strMessageID) != true) { //如果address不为空就跳转到address指定的页面 if (address != "" || address != null) { string strScript = @"
"; page.ClientScript.RegisterStartupScript(page.GetType(), strMessageID, string.Format(strScript, message.Replace("\\", "/"), address)); } //如果address为空的话就不跳转到其他的页面 else { string strScript = @"
"; page.ClientScript.RegisterStartupScript(page.GetType(), strMessageID, String.Format(strScript, message.Replace("\\", "/"))); } } }