ASP.NET Web应用程序的消息框

编程入门 行业动态 更新时间:2024-10-15 10:17:02
本文介绍了ASP.NET Web应用程序的消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在一个asp Windows窗体应用程序,在C#code后面你可以使用:

In an asp windows forms application, in the C# code behind you can use:

MessageBox.Show("Here is my message");

有一个asp web应用程序的相同呢?我可以调用的东西从C#code的后面,将显示一个消息框,用户?

Is there any equivalent in a asp web application? Can I call something from the C# code behind that will display a message box to the user?

这个用法示例:我有一个在code加载的文件后面的按钮。当文件被加载,或者如果有一个错误,我想弹出一个消息给用户说明的结果。

Example usage of this: I have a button that loads a file in the code behind. When the file is loaded or if there is an error I would like to popup a message to the user stating the result.

在这个任何想法?

推荐答案

您想要使用的警报。遗憾的是它并不像你一样与Windows窗体。

You want to use an Alert. Unfortunately it's not as nice as with windows forms.

ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable + "');", true);

这个问题在这里类似: forums.asp/t/1461308.aspx/1

更多推荐

ASP.NET Web应用程序的消息框

本文发布于:2023-11-15 15:59:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1595875.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   消息   ASP   NET   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!