如何使用VB和C#在Asp点网中的消息框中显示消息 [英] How to display message in Message Box in Asp dot net using VB and c#
本文介绍了如何使用VB和C#在Asp点网中的消息框中显示消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#在Asp点网中的消息框中显示消息?
How to display message in Message Box in Asp dot net using c# ?
推荐答案
我认为您想显示Window的消息框,它''会像这样
I think you want to show Window''s Message Box,it''ll be like this
System.Windows.Form.MessageBox.Show()
和JS警报会像
Reponse.Write("alert(" Hello)");
and JS alert will be like
Reponse.Write("alert(''Hello'')");
亲爱的朋友,
请通过此链接解决您的问题:-
ASP.Net不允许您像在C#Windows应用程序中一样显示消息框.在此处或Ajax中使用JavaScript警报框.
http://stackoverflow.com/questions/4779576/how-to-display-windows-form-messagebox-in-asp-net-web-application [
Dear Friend,
Please follow this link for your problem:-
ASP.Net doesn''t allow you to show message boxes like in C# windows application. Use javascript alert boxes here or ajax.
http://stackoverflow.com/questions/4779576/how-to-display-windows-form-messagebox-in-asp-net-web-application[^]
Always do some google search first.
Thanks
JavaScript和jQuery是连击选项
但是在c#中尝试一下
JavaScript and jQuery is batter option
but try this in c#
string myStringVariable = string.Empty;
myStringVariable = "Welcome";
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + myStringVariable + "');", true);
看看这个:
一个简单的ASP.NET服务器控件:消息框&确认框 [ ^ ]
and have a look at this:
A Simple ASP.NET Server Control: Message Box & Confirmation Box[^]
这篇关于如何使用VB和C#在Asp点网中的消息框中显示消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文