ASP.NET Messagebox

T

tma

How are message boxes (not the browser pop-up variety but rather the .NET
msgbox) achieved in ASP.NET?
 
A

Arran Pearce

If your not talking about browser pop-up what results are you expecting?
Something like the javascript alert box?

remember asp.net is server side code, if you want to do any form of
window control you have to output client side code.
 
M

Marina

You can't. How could you? It would mean a server side messagebox, not a
client side one. It would also mean that the client would have to have the
..NET framework.

You can use embedded windows forms controls in asp.net pages, but now you
are talking about major security configuration issues and requiring clients
to install the .net framework all so they could have a different
messagebox...
 
T

tma

I'm not familiar with a JavaScript alert box, but I see how this question
seems stupid given what has been pointed out in the replies. I'm (obviously)
a novice at this .NET stuff and struggle putting together what I experience
versus what I can deliver via Visual Studio.

Thank you both for the speedy replies!
 
B

Brian Henry

all you have is either

window.open
window.showModalDialog
or
alert() in javascript to do this
 
S

Steve C. Orr [MVP, MCSD]

You can execute a line of code like this when you want a message box to be
displayed.
(This writes out the necessary client side javascript to your HTML page to
make the alert pop up as soon as the page is sent to their browser.)

RegisterStartupScript("startupScript", "<script
language=JavaScript>alert('This is my message.');</script>");

Here's more info:
http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp

Here are a couple controls you might find to be useful:
http://www.metabuilders.com/Tools/ConfirmedButtons.aspx
http://www.jttz.com/msgbox/index.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top