How display MessageBox in aspx-page?

  • Thread starter Alexander Vasilevsky
  • Start date
S

Scott M.

You have to send the command for that down to the client, since it is the
client that will be rendering the page. Since JavaScript is the standard
scripting language that all clients understand, you need to send the
JavaScript alert() command to the client.

Response.Write("alert('Your message here.')") would do it.
 
H

HillBilly

There is no native MessageBox for web development. We have to use
client-side script and HTML. The easiest way out?

//JavaScript
alert('Hello World');


You don't by any chance have any documentation naming and comparing the
sound files distributed with the various Windows OS releases do you? For no
good reason I can think of the Vista release has renamed and relocated the
folders and all of the sound files.
 
T

Teemu Keiski

You can output a javascript snippet (for example alert window) from
server-side code with Page.ClientScript.RegisterXXX methods or if you're
using ASP.NET Ajax, with ScriptManager's RegisterXXX methods
(XXX=StartupScript / ClientScriptBlock). That's if you need to initiate it
from server-side.

You can also show something with DIVs / SPAN's when you have a lot more
control over the styles etc. Certainly there's also popup windows, but they
are not very friendly for users using popup blockers (quite many don't like
them at all). :)
 

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

Top