本文介绍了显示警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在asp中通过参数传递从代码后面显示警报消息
Display alert message from Code behind in asp with parameter passing
推荐答案我认为以下CodeProject文章 已启用AJAX的消息框 [ ^ ] ASP.NET中的简单MessageBox功能 [ ^ ] 服务器端MessageBox [ ^ ] 可能对上述目的有所帮助. I think the following CodeProject articles AJAX Enabled MessageBox[^] Simple MessageBox functionality in ASP.NET[^] Server Side MessageBox[^] may be helpful for the above purpose.
此技巧完全包含您所需要的内容. 用于ASP.NET网站的类似于MessageBox的Windows窗体 [ ^ ] This tip contains exactly what you need. A Windows Form like MessageBox for ASP.NET Website[^]
您可以使用以下方法显示警报消息 You Can use the below method to show the alert message public static void ShowAlertMessage (String error) { Page page =HttpContext.Current.Handler as Page; if(page!=null) { error=error.Replace("'","\'"); ScriptManager.RegisterStartupScript(page, page.GetType(),"err_msg","alert('"+error+"');",true); } }
更多推荐
显示警报消息
发布评论