I tried but I guess Message Box only works with win forms. What is the best alternative to use in web forms?
+6
A:
You can use confirm
for yes/no questions and alert
for "OK" messages in JavaScript.
The other alternative is to use JavaScript to pop up a new window that looks and acts like a message box. Modality in this case varied by browser. In Internet Explorer, the method
window.showModalDialog(url,name,params)
will display a modal dialog. The Mozilla approach is to still use
window.open(url,name,params)
but add modal=yes
to the params
list.
DocMax
2008-10-14 23:29:34
A:
The Ajax ModalPopup also works nicely. Here is an example:
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx
A:
You have dojo dialog widget: http://www.dojotoolkit.org/ and you can use it as a message box.
milot
2008-10-14 23:40:07