Messagebox in Web??

rcarrillov

Member
Joined
Aug 23, 2006
Messages
6
Location
Mexico
Programming Experience
Beginner
Hi ASP Gurus.

Is there an object in Web that works like a messagebox ?

Do you have a sample?

Thanks in advance
 
You have the Javascript alert method. Add a Html button to the form and doubleclick it, the onclick Javascript method is generated where you can write this code example:
VB.NET:
alert("Hello")
The VB MsgBox method does also work from codebehind, but it doesn't work very well. You need a postback and the dialog gets lost behind windows.
 
Thaks John,
It works fine using javascript

One more cuestion, its easy to launch an script using the onclick event, but how can i call the event, programaticaly using a comparation. by example:

in HTML view
<script language="javascript" id="clientEventHandlersJS">
<!--
function Button02_onclick () {
window.confirm("Desea reasignar el documento a otro estante ?")
}
-->
</script>
</HEAD>


in code view
If myreader.Read() Then
If myreader("docEstante") <> "" Then
'I need to launch Button02_onclik here
End If
...
 
Server side code (ASP/VB) and client side code (JS/VBS) is not interoperable. (if I understand that question..)
 
Either redirect to another ASP.Net page that function as a confirmation page, or add a Javascript event/check somewhere client side with confirm dialog. The way to exchange/interact ASP server code and client script code is to use visible or hidden element values on the page. You have to design page code to accommodate this.
 
Back
Top