如何在asp.net页面中显示消息框? [英] how to display a messagebox in asp.net page?
问题描述
我最近发现,部署后不允许在asp.net页面中显示消息框.
我收到一条错误消息当应用程序不在UserInteractive模式下运行时显示模式对话框或窗体是无效操作.指定ServiceNotification或DefaultDesktopOnly样式以显示来自服务应用程序的通知."
因此,我在asp.net的消息框上进行了搜索
我找到了一种解决方案,但它仅适用于ALERT类型的消息框.
I recently found out that messageboxes in asp.net pages aren''t allowed when deployed.
I get an error message of "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application."
So, I googled messageboxes for asp.net
I found a solution but it''s only applicable to ALERT types of messagebox.
Public Sub ASPNET_MsgBox(ByVal Message As String)
System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf)
System.Web.HttpContext.Current.Response.Write("</SCRIPT>")
End Sub
我现在关心的是消息框的确认类型.
我发现了一些东西.
我只需要将警报"替换为确认",但无法获得返回值.
有人可以帮忙吗??? pleaseee ?????
My concern now is the CONFIRM type of messagebox.
I found some stuff.
I just need to replace the "alert" to "confirm" but I can''t get the return value.
can someone help??? pleaseee?????
推荐答案
在 ^ ] ...
这篇关于如何在asp.net页面中显示消息框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!