显示警报消息 [英] Display alert message

查看:64
本文介绍了显示警报消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net中通过参数传递从代码后面显示警报消息

Display alert message from Code behind in asp.net 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);
  }

}


这篇关于显示警报消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆