如何在ASP,NET Web应用程序中显示消息框 [英] How to dispaly messagebox in asp,net web applications

查看:110
本文介绍了如何在ASP,NET Web应用程序中显示消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想知道如何在asp.net Web应用程序中显示消息框,以防出现错误或与最终用户保持一致.在C#Windows应用程序中,此便利可通过MessageBox.Show("message to display")来使用,就像这样,在asp.net Web应用程序中是否有任何功能可以显示消息?

请任何人给我信息以实现这一目标.

在此先感谢
Uday

Hi all,

I would like to know how to display a Messagebox in asp.net web application incase of errors or for conformation to end users. In C# Windows application this facilite is available with MessageBox.Show("message to display") like this is there any functions are availble in asp.net web application to display message?

Please anybody give me information to achive this.

Thanks in advance
Uday

推荐答案

使用具有警报功能的javascript或jquery....
您无法在网络中找到消息框.
use javascript or jquery with alert....
you can not find messagebox in web.


请在下面检查

Please check below

ClientScript.RegisterStartupScript(GetType(), "Message", "<SCRIPT LANGUAGE='javascript'>alert('Hi.....);</script>");



如果您使用了任何更新面板,请在下面检查



if you used any update panels then check below

ScriptManager.RegisterStartupScript(UpdatePanel1, typeof(string), "alertscipt", "alert('Hi....')", true);


在asp.net中没有像c#这样的消息框.

您可以使用javascript警报框.喜欢...
There is no message box available in asp.net like c#.

you can use javascript alert box. Like...
ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "alert(''" + error + "'');", true);



请参阅此链接

http://www.karpach.com/Javascript-Alert-Message-codebehind-ASP- NET.htm [ ^



Refer this link

http://www.karpach.com/Javascript-Alert-Message-codebehind-ASP-NET.htm[^


这篇关于如何在ASP,NET Web应用程序中显示消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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