如何在网页中使用消息框 [英] how to use message box in web page
本文介绍了如何在网页中使用消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的项目中,我想使用消息框。我收到错误。在Windows窗体中它可以工作但不在网页中。任何人都可以提供建议。
System.MessageBox.Show(ddd);
In my project I would like to use message box. I get error. In windows forms it works but not in web page. Can anyone advice.
System.MessageBox.Show("ddd");
推荐答案
你可以使用如下代码(javascript + c#)
Hi,
You can use as below code(javascript+c#)
public void msgbox(string message)
{
string msg = @"alert('" + message + "');";
ScriptManager.RegisterStartupScript(this, this.GetType(), "s1", msg, true);
}
来源: Asp.Net C#中的消息框 [ ^ ]
如果找到它可以帮助你标记为ans&也投票
Hemant Singh
Source : Message Box in Asp.Net C#[^]
If you find it helps you please mark as ans & vote also
Hemant Singh
这个东西在网页中不起作用 - 没有消息框但是有基于消息的警报或模态对话框。并且MessageBox.Show()
适用于win-Forms
所以你可以使用这些 -
使用jqyery -
模态消息 [ ^ ]
使用javascipt
Asp.net使用javascript 显示来自代码的警报消息 [ ^ ]
使用ajax-modal popup extender
Ajax Moda lPopUpExtender示例 [ ^ ]
或者您仍然希望在查看后在网页中使用Messagebox.Show()
这些简单的例子和设计然后
一个Windows窗体,如MessageBox for ASP.NET Website [ ^ ]
阅读更多 -
< a href =http://www.codeproject.com/Articles/43281/Buttons-Message-Box-and-Confirm-Box-in-ASP-NET-3-5>按钮,消息框和确认框ASP.NET 3.5 [ ^ ]
VB.NET和C#中的服务器端消息框 [ ^ ]
使用javascript的网页弹出窗口类型 [ ^ ]
使用ASP.Net AJAX ModalPopupExtender控件构建模态弹出窗口 [ ^ ]
This thing will not work in webpages-do not have messagebox but have alerts or modal dialogs based messages.And theMessageBox.Show("")
works for win-Forms
So you can use these-
using jqyery-
modal-message[^]
using javascipt
Asp.net show alert message from code behind using javascript[^]
using ajax-modal popup extender
Ajax ModalPopUpExtender Example[^]
or still you want to useMessagebox.Show("")
in webpages after viewing these easy examples and designs then
A Windows Form like MessageBox for ASP.NET Website[^]
read more-
Buttons, Message Box, and Confirm Box in ASP.NET 3.5[^]
Server Side Message Box in VB.NET and C#[^]
Types of Popups in webpages using javascript[^]
Building Modal Popup using ASP.Net AJAX ModalPopupExtender Control[^]
这篇关于如何在网页中使用消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文