473,383 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How do you display a msgBox in a web application?

I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.
Nov 21 '05 #1
6 11096
> I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.


In server-side code, you can't.

On the client,

<script language="JavaScript">
<!--
alert("Your message here");
-->
</script>

or

<script language="VBScript">
MsgBox "Your Message Here"
</script>

But note that some browsers don't like VB Script.
--
Peace & happy computing,

Mike Labosh, MCSD
"I have no choice but to believe in free will."
Nov 21 '05 #2
Hi,

you have to use JavaScript or VBScript to show a MessageBox in Web apps.

However and If you undertand Spanish, there is a very good article in MSDN
Spanish, wrote by another MVP, that teach as put and use MessageBox in Web
apps.

The URL of this article is:
http://www.microsoft.com/spanish/msd...ces/art120.asp

I hope that helps.

Kind Regards,

Jorge Serrano
MVP VB.NET

"rr****@800mcmahan.com" wrote:
I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.

Nov 21 '05 #3
Roman,

Maybe this can help you as well?

Private Sub Page_Load(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim str As String = "<script language " & _
"=javascript>alert('Click on the button?');</script>"
Page.RegisterStartupScript("Startup", str)
End If
Me.Button1.Attributes("onClick") = _
"alert('I hope this helps a little bit?')"
End Sub
///

Cor
"rr****@800mcmahan.com" <rr*****************@discussions.microsoft.com>
I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.

Nov 21 '05 #4
Flag the Espanola, Scott Mitchell a borne and bred genius always has very well written articles on
this kind of subject. Check him out at 4 Guys from Rolla or here in this MSDN feature article.

http://msdn.microsoft.com/asp.net/us...SideScript.asp

hth
Richard
"Jorge Serrano [MVP VB]" <NO*******************@NOQUIEROSPAMportalvbNOSPAM. com.NOQUIEROSPAM> wrote
in message news:56**********************************@microsof t.com...
Hi,

you have to use JavaScript or VBScript to show a MessageBox in Web apps.

However and If you undertand Spanish, there is a very good article in MSDN
Spanish, wrote by another MVP, that teach as put and use MessageBox in Web
apps.

The URL of this article is:
http://www.microsoft.com/spanish/msd...ces/art120.asp

I hope that helps.

Kind Regards,

Jorge Serrano
MVP VB.NET

"rr****@800mcmahan.com" wrote:
I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.

Nov 21 '05 #5
Thanks Richard!

I like the Scott articles and contributions very much.
I didn't know about this.

Thanks a lot!

Jorge
"Richard Myers" wrote:
Flag the Espanola, Scott Mitchell a borne and bred genius always has very well written articles on
this kind of subject. Check him out at 4 Guys from Rolla or here in this MSDN feature article.

http://msdn.microsoft.com/asp.net/us...SideScript.asp

hth
Richard
"Jorge Serrano [MVP VB]" <NO*******************@NOQUIEROSPAMportalvbNOSPAM. com.NOQUIEROSPAM> wrote
in message news:56**********************************@microsof t.com...
Hi,

you have to use JavaScript or VBScript to show a MessageBox in Web apps.

However and If you undertand Spanish, there is a very good article in MSDN
Spanish, wrote by another MVP, that teach as put and use MessageBox in Web
apps.

The URL of this article is:
http://www.microsoft.com/spanish/msd...ces/art120.asp

I hope that helps.

Kind Regards,

Jorge Serrano
MVP VB.NET

"rr****@800mcmahan.com" wrote:
I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.


Nov 21 '05 #6
You guys have been great. Thanks again.

"Cor Ligthert" wrote:
Roman,

Maybe this can help you as well?

Private Sub Page_Load(ByVal sender As _
System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Dim str As String = "<script language " & _
"=javascript>alert('Click on the button?');</script>"
Page.RegisterStartupScript("Startup", str)
End If
Me.Button1.Attributes("onClick") = _
"alert('I hope this helps a little bit?')"
End Sub
///

Cor
"rr****@800mcmahan.com" <rr*****************@discussions.microsoft.com>
I've tried the good old fashioned msgBox but I get:

It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.


Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: yezanxiong | last post by:
Hello all, I am new in asp.net developer,I would like to ask a simple question. how to display a message box in web application using asp.net? If I just use Private Sub btnOK_Click(ByVal...
10
by: z | last post by:
I just installed Visual Studio .Net with Framework 1.1. I already had VB6 SP6 installed. I wanted to do a quick "hello world" example in VB.Net. The code is here: Private Sub...
9
by: Ivan Jericevich | last post by:
In my code below at the line 'response' a blip sound is heard and the program exits the sub -- No MsgBox is displayed. What am I doing wrong? If nonNumberEntered = True Then msg = "Enter...
15
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out,...
1
by: Ky_fanatic | last post by:
I am working on an application which returns data from multiple databases. The user enters a pallet ticket and it goes out to the multiple db's and returns data which meets the criteria. My...
13
JodiPhillips
by: JodiPhillips | last post by:
G'day, I have a silly and simple problem that I need some guidance with. Due to the way our network is set up, I am unable to use the group permissions for Access and have had to implement log...
2
by: smorrison64 | last post by:
I have a form that is coded to open a File Dialog boc to pick a picture to display on that particular item on a subform. My form is not based on query, but rather two separate tables (one primary,...
4
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, I am trying to write a test console app in vb2008 express. Below is the code: Module Module1 Sub Main() Dim frm As New Form1 MsgBox("a test message") 'frm.Visible = True
2
by: Plumebee | last post by:
Hi, I am very new to programming and have just started to use Visual Basic 2005 Express Edition. I am trying to read from a text file to draw a rectangles and lines. However to begin I'm trying to...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.