How display MessageBox in aspx-page?

  • Thread starter Thread starter Alexander Vasilevsky
  • Start date Start date
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.
 
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.
 
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). :-)
 
Back
Top