By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,730 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,730 IT Pros & Developers. It's quick & easy.

MessageBox question

P: n/a
Hi at all
i have a web application (in vb.net), and i want to use a message box
control like System.Windows.Forms.MessageBox control, to show simple
messages . I used this but vb.net said
me an exception:

Imports System.Windows.Forms
'Dim msgBox As MessageBox
'msgBox.Show("User updating successful.", MessageBoxButtons.OK,
MessageBoxIcon.Information)

and the exception is

"Enum argument value 64 is not valid for buttons. buttons should be a value
from DialogResult."

I have think that exists a similar messagebox to web application, i was
looking for under System.Web.UI.WebControls but i didn't find it.
which is the class or control that do this?

thanks

roberto
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Roberto,

There is no messagebox for a webpage.
See in this newsgroup a questionmessage from rroman, on 8 november
"How do you display a msgBox in a web application?"

He had exactly the same question as you and there are more answers on that
including mine.

I hope this helps/

Cor

"roberto" <do****@ampersoftware.it>
Hi at all
i have a web application (in vb.net), and i want to use a message box
control like System.Windows.Forms.MessageBox control, to show simple
messages . I used this but vb.net said
me an exception:

Imports System.Windows.Forms
'Dim msgBox As MessageBox
'msgBox.Show("User updating successful.", MessageBoxButtons.OK,
MessageBoxIcon.Information)

and the exception is

"Enum argument value 64 is not valid for buttons. buttons should be a
value
from DialogResult."

I have think that exists a similar messagebox to web application, i was
looking for under System.Web.UI.WebControls but i didn't find it.
which is the class or control that do this?

thanks

roberto

Nov 21 '05 #2

P: n/a
"roberto" <do****@ampersoftware.it> schrieb:
i have a web application (in vb.net), and i want to use a message box
control like System.Windows.Forms.MessageBox control, to show simple
messages . I used this but vb.net said
me an exception:

Imports System.Windows.Forms
'Dim msgBox As MessageBox
'msgBox.Show("User updating successful.", MessageBoxButtons.OK,
MessageBoxIcon.Information)
'Show' is a shared method of 'MessageBox', so you can use 'MessageBox.Show'
directly.
I have think that exists a similar messagebox to web application, i was
looking for under System.Web.UI.WebControls but i didn't find it.
which is the class or control that do this?


No, there is no 'MessageBox' class. You'll have to use either a client-side
VBScript ('MsgBox') or a JScript ('alert').

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3

P: n/a
Hi Roberto
The messageBox class show some windows Dll to show the message box that you
see . this is because when you develop a desktop application with vb.net .
it is also called "windows" application so it is build to run under windows
and it can use dll of windows . as for asp.net web application , they don't
execute much on the user side as most of the processing is done on the
server . you don't even know what is the OS that the user has .
I was just trying to give you an idea why you don't have MessageBox on the
asp.net classes. What you can do however is a small script that run on the
client side that would show the message in a message box . for example ,
there is a sample on this link
http://gnwda.org/tutorials/coding/java4.htm
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 21 '05 #4

P: n/a
Thanks,
but i don't see the rroman emails on 8 november
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uG**************@TK2MSFTNGP14.phx.gbl...
Roberto,

There is no messagebox for a webpage.
See in this newsgroup a questionmessage from rroman, on 8 november
"How do you display a msgBox in a web application?"

He had exactly the same question as you and there are more answers on that
including mine.

I hope this helps/

Cor

"roberto" <do****@ampersoftware.it>
Hi at all
i have a web application (in vb.net), and i want to use a message box
control like System.Windows.Forms.MessageBox control, to show simple
messages . I used this but vb.net said
me an exception:

Imports System.Windows.Forms
'Dim msgBox As MessageBox
'msgBox.Show("User updating successful.", MessageBoxButtons.OK,
MessageBoxIcon.Information)

and the exception is

"Enum argument value 64 is not valid for buttons. buttons should be a
value
from DialogResult."

I have think that exists a similar messagebox to web application, i was
looking for under System.Web.UI.WebControls but i didn't find it.
which is the class or control that do this?

thanks

roberto



Nov 21 '05 #5

P: n/a
Roberto,

I am sure it is there, however I have searched for you on Google for it.

We do not know what your newsreader does.

http://tinyurl.com/3p8d9

I hope this helps?

Cor

"roberto" <do****@ampersoftware.it>
Thanks,
but i don't see the rroman emails on 8 november
"Cor Ligthert" <no************@planet.nl> wrote in message
news:uG**************@TK2MSFTNGP14.phx.gbl...
Roberto,

There is no messagebox for a webpage.
See in this newsgroup a questionmessage from rroman, on 8 november
"How do you display a msgBox in a web application?"

He had exactly the same question as you and there are more answers on
that
including mine.

I hope this helps/

Cor

"roberto" <do****@ampersoftware.it>
> Hi at all
> i have a web application (in vb.net), and i want to use a message box
> control like System.Windows.Forms.MessageBox control, to show simple
> messages . I used this but vb.net said
> me an exception:
>
> Imports System.Windows.Forms
> 'Dim msgBox As MessageBox
> 'msgBox.Show("User updating successful.", MessageBoxButtons.OK,
> MessageBoxIcon.Information)
>
> and the exception is
>
> "Enum argument value 64 is not valid for buttons. buttons should be a
> value
> from DialogResult."
>
> I have think that exists a similar messagebox to web application, i was
> looking for under System.Web.UI.WebControls but i didn't find it.
> which is the class or control that do this?
>
> thanks
>
> roberto
>
>



Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.